summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-02-06 18:15:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-02-06 18:15:43 +0000
commit467828914a2484401b90502dfc710d42080ee317 (patch)
treef7af00ea51c1e376fe4d786c1c0c1b8189eabc2e /libs
parent17596bceb14c3cbf9a09b021f20283c1c966d56b (diff)
parent46597ced56006e173399e1aa5f47ee18da62b14d (diff)
Merge "Migrate to getNetworkSelectionStatus()"
Diffstat (limited to 'libs')
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java
index 751c6099c..9ee3f46ee 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java
@@ -16,6 +16,8 @@
package com.android.wifitrackerlib;
+import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_ENABLED;
+import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED;
import static android.net.wifi.WifiInfo.sanitizeSsid;
import static androidx.core.util.Preconditions.checkNotNull;
@@ -284,10 +286,13 @@ public class StandardWifiEntry extends WifiEntry {
private String getDisconnectedStateDescription() {
if (isSaved() && mWifiConfig.hasNoInternetAccess()) {
final int messageID =
- mWifiConfig.getNetworkSelectionStatus().isNetworkPermanentlyDisabled()
+ mWifiConfig.getNetworkSelectionStatus().getNetworkSelectionStatus()
+ == NETWORK_SELECTION_PERMANENTLY_DISABLED
? R.string.wifi_no_internet_no_reconnect : R.string.wifi_no_internet;
return mContext.getString(messageID);
- } else if (isSaved() && !mWifiConfig.getNetworkSelectionStatus().isNetworkEnabled()) {
+ } else if (isSaved()
+ && (mWifiConfig.getNetworkSelectionStatus().getNetworkSelectionStatus()
+ != NETWORK_SELECTION_ENABLED)) {
final WifiConfiguration.NetworkSelectionStatus networkStatus =
mWifiConfig.getNetworkSelectionStatus();
switch (networkStatus.getNetworkSelectionDisableReason()) {