diff options
author | Jason Monk <jmonk@google.com> | 2015-06-02 14:52:22 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-06-02 14:52:22 -0400 |
commit | a296c69cc2c798acd070b843c699a9cd1e337ff4 (patch) | |
tree | 82649273fb28a56e8265e74166f206be5935c36d /packages/SettingsLib/src/com/android/settingslib/wifi | |
parent | 233241f13d5d7f841d3db80408429d4d0a528c78 (diff) | |
download | frameworks_base-a296c69cc2c798acd070b843c699a9cd1e337ff4.zip frameworks_base-a296c69cc2c798acd070b843c699a9cd1e337ff4.tar.gz frameworks_base-a296c69cc2c798acd070b843c699a9cd1e337ff4.tar.bz2 |
Handle network info updates while scanning is paused
Bug: 21581533
Change-Id: I4216c3e9b64cb758e32dd93c39061f9d7a642ee0
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/wifi')
-rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java index f324933..cf3b7c8 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java @@ -357,17 +357,19 @@ public class WifiTracker { } private void updateNetworkInfo(NetworkInfo networkInfo) { - /* sticky broadcasts can call this when wifi is disabled */ - if (!mWifiManager.isWifiEnabled()) { - mScanner.pause(); - return; - } + if (mScanner != null) { + /* sticky broadcasts can call this when wifi is disabled */ + if (!mWifiManager.isWifiEnabled()) { + mScanner.pause(); + return; + } - if (networkInfo != null && - networkInfo.getDetailedState() == DetailedState.OBTAINING_IPADDR) { - mScanner.pause(); - } else { - mScanner.resume(); + if (networkInfo != null && + networkInfo.getDetailedState() == DetailedState.OBTAINING_IPADDR) { + mScanner.pause(); + } else { + mScanner.resume(); + } } mLastInfo = mWifiManager.getConnectionInfo(); |