OSDN Git Service

Updated summary logic for wifi
authorSalvador Martinez <dehboxturtle@google.com>
Fri, 23 Sep 2016 15:54:20 +0000 (08:54 -0700)
committerSalvador Martinez <dehboxturtle@google.com>
Fri, 23 Sep 2016 15:54:20 +0000 (08:54 -0700)
Wifi summary claimed it would not
reconnect under conditions where it should.
This has been changed to properly say when an
AP will automatically be reconnected to.

Test: make RunSettingsLibRoboTests
Bug: 29973023
Change-Id: I2ffb4ec3b83e93c3df9ee179fc6a6bf59acec42e

packages/SettingsLib/res/values/strings.xml
packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java

index 682af8b..08e5164 100644 (file)
     <string name="wifi_disabled_password_failure">Authentication problem</string>
     <!-- Summary for the remembered network but currently not in range. -->
     <string name="wifi_not_in_range">Not in range</string>
+    <!-- Summary for the network but no internet connection was detected. -->
+    <string name="wifi_no_internet_no_reconnect">No Internet Access Detected, won\'t automatically reconnect.</string>
     <!-- Summary for the remembered network but no internet connection was detected. -->
-    <string name="wifi_no_internet">No Internet Access Detected, won\'t automatically reconnect.</string>
+    <string name="wifi_no_internet">No Internet Access.</string>
     <!-- Summary for saved networks -->
     <string name="saved_network">Saved by <xliff:g id="name">%1$s</xliff:g></string>
 
index 92f1b18..b63752c 100644 (file)
@@ -409,7 +409,10 @@ public class AccessPoint implements Comparable<AccessPoint> {
             String format = mContext.getString(R.string.available_via_passpoint);
             summary.append(String.format(format, config.providerFriendlyName));
         } else if (config != null && config.hasNoInternetAccess()) {
-            summary.append(mContext.getString(R.string.wifi_no_internet));
+            int messageID = config.getNetworkSelectionStatus().isNetworkPermanentlyDisabled()
+                    ? R.string.wifi_no_internet_no_reconnect
+                    : R.string.wifi_no_internet;
+            summary.append(mContext.getString(messageID));
         } else if (config != null && !config.getNetworkSelectionStatus().isNetworkEnabled()) {
             WifiConfiguration.NetworkSelectionStatus networkStatus =
                     config.getNetworkSelectionStatus();