diff options
author | Joe Onorato <joeo@google.com> | 2010-11-15 16:39:24 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-15 16:39:24 -0800 |
commit | b86c89c1a1070a076fcfec8e9bf743245a996d8b (patch) | |
tree | 5ce9a9563d98b458c7f365792dd3dc56ab330d85 | |
parent | 20c14fd7b31dfb333dfafbf7055c16160e8cc1dd (diff) | |
parent | 09f686ec7ea3ea103736b7173e55b0b214bfb819 (diff) | |
download | frameworks_base-b86c89c1a1070a076fcfec8e9bf743245a996d8b.zip frameworks_base-b86c89c1a1070a076fcfec8e9bf743245a996d8b.tar.gz frameworks_base-b86c89c1a1070a076fcfec8e9bf743245a996d8b.tar.bz2 |
Merge "use the proper number of wifi icon levels."
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java | 5 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index 04f7195..4ff2429 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -499,7 +499,8 @@ public class NetworkController extends BroadcastReceiver { if (mWifiConnected && !wasConnected) { WifiInfo info = mWifiManager.getConnectionInfo(); if (info != null) { - mWifiLevel = WifiManager.calculateSignalLevel(info.getRssi(), 101); + mWifiLevel = WifiManager.calculateSignalLevel(info.getRssi(), + WifiIcons.WIFI_LEVEL_COUNT); mWifiSsid = huntForSsid(info); } else { mWifiLevel = 0; @@ -513,7 +514,7 @@ public class NetworkController extends BroadcastReceiver { } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) { if (mWifiConnected) { final int newRssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200); - mWifiLevel = WifiManager.calculateSignalLevel(newRssi, 101); + mWifiLevel = WifiManager.calculateSignalLevel(newRssi, WifiIcons.WIFI_LEVEL_COUNT); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java index d218ebf..0787289 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java @@ -29,4 +29,6 @@ class WifiIcons { R.drawable.stat_sys_wifi_signal_3_fully, R.drawable.stat_sys_wifi_signal_4_fully } }; + + static final int WIFI_LEVEL_COUNT = WIFI_SIGNAL_STRENGTH[0].length; } |