summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-08-26 14:04:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-26 14:04:55 -0700
commit2589c93733cef18a7f7502dd5830baa0a02423a7 (patch)
tree886361ebba65a8abcc7eac762cec90bde9453bd6
parent539340fe2c3dfd33564c1ddc9ee5c2884aa56874 (diff)
parent8136de08ff4b5c4cca11220143f5905dca38cc26 (diff)
downloadframeworks_base-2589c93733cef18a7f7502dd5830baa0a02423a7.zip
frameworks_base-2589c93733cef18a7f7502dd5830baa0a02423a7.tar.gz
frameworks_base-2589c93733cef18a7f7502dd5830baa0a02423a7.tar.bz2
Merge "Fixed WifiWatchdog notification bugs"
-rwxr-xr-xcore/res/res/values/strings.xml4
-rw-r--r--wifi/java/android/net/wifi/WifiConfigStore.java8
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java1
3 files changed, 9 insertions, 4 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 9455124..a3e460e 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -2665,8 +2665,8 @@
<!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems. This is the notification's title / ticker. -->
<string name="wifi_watchdog_network_disabled">Couldn\'t connect to Wi-Fi</string>
- <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems. This is a partial string of the message, which will also include the (possibly truncated) hotspot name. -->
- <string name="wifi_watchdog_network_disabled_detailed"> has a poor internet connection.</string>
+ <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems. The complete alert msg is: <hotspot name> + this string, i.e. "Linksys has a poor internet connection" -->
+ <string name="wifi_watchdog_network_disabled_detailed">\u0020has a poor internet connection.</string>
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java
index 45c9869..83dda5c 100644
--- a/wifi/java/android/net/wifi/WifiConfigStore.java
+++ b/wifi/java/android/net/wifi/WifiConfigStore.java
@@ -376,7 +376,8 @@ class WifiConfigStore {
boolean ret = WifiNative.disableNetworkCommand(netId);
synchronized (sConfiguredNetworks) {
WifiConfiguration config = sConfiguredNetworks.get(netId);
- if (config != null) {
+ /* Only change the reason if the network was not previously disabled */
+ if (config != null && config.status != Status.DISABLED) {
config.status = Status.DISABLED;
config.disableReason = reason;
}
@@ -610,7 +611,10 @@ class WifiConfigStore {
synchronized (sConfiguredNetworks) {
for(WifiConfiguration config : sConfiguredNetworks.values()) {
if(config != null && config.networkId != netId) {
- config.status = Status.DISABLED;
+ if (config.status != Status.DISABLED) {
+ config.status = Status.DISABLED;
+ config.disableReason = WifiConfiguration.DISABLED_UNKNOWN_REASON;
+ }
}
}
}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index d2a0b30..85a6f27 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -530,6 +530,7 @@ public class WifiConfiguration implements Parcelable {
if (source != null) {
networkId = source.networkId;
status = source.status;
+ disableReason = source.disableReason;
SSID = source.SSID;
BSSID = source.BSSID;
preSharedKey = source.preSharedKey;