Rename WifiConfiguration.getHasEverConnected()
Renamed to hasEverConnected() to conform to API guidelines. Bug: 146046526 Test: make RunSettingsRoboTests -j40 Change-Id: Ie88945326977ea11a05721e40a81c338fee61cb6
This commit is contained in:
@@ -77,7 +77,6 @@ import com.android.settingslib.search.SearchIndexableRaw;
|
|||||||
import com.android.settingslib.wifi.LongPressWifiEntryPreference;
|
import com.android.settingslib.wifi.LongPressWifiEntryPreference;
|
||||||
import com.android.wifitrackerlib.WifiEntry;
|
import com.android.wifitrackerlib.WifiEntry;
|
||||||
import com.android.wifitrackerlib.WifiEntry.ConnectCallback;
|
import com.android.wifitrackerlib.WifiEntry.ConnectCallback;
|
||||||
import com.android.wifitrackerlib.WifiEntry.ConnectCallback.ConnectStatus;
|
|
||||||
import com.android.wifitrackerlib.WifiPickerTracker;
|
import com.android.wifitrackerlib.WifiPickerTracker;
|
||||||
|
|
||||||
import java.time.Clock;
|
import java.time.Clock;
|
||||||
@@ -540,7 +539,7 @@ public class WifiSettings2 extends RestrictedSettingsFragment
|
|||||||
|
|
||||||
if (selectedEntry.isSaved()) {
|
if (selectedEntry.isSaved()) {
|
||||||
if (!selectedEntry.getWifiConfiguration().getNetworkSelectionStatus()
|
if (!selectedEntry.getWifiConfiguration().getNetworkSelectionStatus()
|
||||||
.getHasEverConnected()) {
|
.hasEverConnected()) {
|
||||||
launchConfigNewNetworkFragment(selectedEntry);
|
launchConfigNewNetworkFragment(selectedEntry);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -272,7 +272,7 @@ public class WifiUtils {
|
|||||||
return CONNECT_TYPE_OPEN_NETWORK;
|
return CONNECT_TYPE_OPEN_NETWORK;
|
||||||
} else if (accessPoint.isSaved() && config != null
|
} else if (accessPoint.isSaved() && config != null
|
||||||
&& config.getNetworkSelectionStatus() != null
|
&& config.getNetworkSelectionStatus() != null
|
||||||
&& config.getNetworkSelectionStatus().getHasEverConnected()) {
|
&& config.getNetworkSelectionStatus().hasEverConnected()) {
|
||||||
return CONNECT_TYPE_SAVED_NETWORK;
|
return CONNECT_TYPE_SAVED_NETWORK;
|
||||||
} else if (accessPoint.isPasspoint()) {
|
} else if (accessPoint.isPasspoint()) {
|
||||||
// Access point provided by an installed Passpoint provider, connect using
|
// Access point provided by an installed Passpoint provider, connect using
|
||||||
|
@@ -100,7 +100,7 @@ public class ConnectToWifiHandlerTest {
|
|||||||
when(mAccessPoint.isSaved()).thenReturn(true);
|
when(mAccessPoint.isSaved()).thenReturn(true);
|
||||||
when(mAccessPoint.getSecurity()).thenReturn(AccessPoint.SECURITY_PSK);
|
when(mAccessPoint.getSecurity()).thenReturn(AccessPoint.SECURITY_PSK);
|
||||||
final NetworkSelectionStatus status = mock(NetworkSelectionStatus.class);
|
final NetworkSelectionStatus status = mock(NetworkSelectionStatus.class);
|
||||||
when(status.getHasEverConnected()).thenReturn(true);
|
when(status.hasEverConnected()).thenReturn(true);
|
||||||
when(mWifiConfig.getNetworkSelectionStatus()).thenReturn(status);
|
when(mWifiConfig.getNetworkSelectionStatus()).thenReturn(status);
|
||||||
|
|
||||||
mHandler.connect(mContext, mAccessPoint);
|
mHandler.connect(mContext, mAccessPoint);
|
||||||
|
Reference in New Issue
Block a user