diff options
author | Isaac Levy <ilevy@google.com> | 2011-08-25 19:40:52 -0700 |
---|---|---|
committer | Isaac Levy <ilevy@google.com> | 2011-08-26 11:55:33 -0700 |
commit | 8136de08ff4b5c4cca11220143f5905dca38cc26 (patch) | |
tree | 1d5a86c19199939d6a4a8bdb7b2656ff54c2a6c3 /wifi | |
parent | 97c46181c7089cb937cfe3fab536049d2d99ad72 (diff) | |
download | frameworks_base-8136de08ff4b5c4cca11220143f5905dca38cc26.zip frameworks_base-8136de08ff4b5c4cca11220143f5905dca38cc26.tar.gz frameworks_base-8136de08ff4b5c4cca11220143f5905dca38cc26.tar.bz2 |
Fixed WifiWatchdog notification bugs
- Space was truncated on 'disabled' notification
- Disable reason was getting wiped out on subsequent disabled
- disable reason was not propogating to WifiSettings
Change-Id: I2e57ee33d285aad39aabe1b048e7436d364b02f3
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfigStore.java | 8 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 1 |
2 files changed, 7 insertions, 2 deletions
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; |