diff options
author | Robert Greenwalt <robdroid@android.com> | 2009-09-16 17:17:16 -0700 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2009-09-16 17:17:16 -0700 |
commit | 4282a5bad44b1b994a26a8eb02051f29f410d33a (patch) | |
tree | ad33e76b4477b324e4bb2659500175c35a14ab45 /wifi | |
parent | 32c687c20d6ac3080b396787147892dc85126b33 (diff) | |
download | frameworks_base-4282a5bad44b1b994a26a8eb02051f29f410d33a.zip frameworks_base-4282a5bad44b1b994a26a8eb02051f29f410d33a.tar.gz frameworks_base-4282a5bad44b1b994a26a8eb02051f29f410d33a.tar.bz2 |
Reintroduce wifi RssiApprox, reducing driver calls
Only do the full signal strength calc when we need to, otherwise use
an approximate value.
This change was introduced a while back but was lost in some merge.
bug: 2125543
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 9a11404..e3d8bf4 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -1350,7 +1350,7 @@ public class WifiStateTracker extends NetworkStateTracker { */ private synchronized void requestPolledInfo(WifiInfo info, boolean polling) { - int newRssi = WifiNative.getRssiCommand(); + int newRssi = (polling ? WifiNative.getRssiApproxCommand() : WifiNative.getRssiCommand()); if (newRssi != -1 && -200 < newRssi && newRssi < 256) { // screen out invalid values /* some implementations avoid negative values by adding 256 * so we need to adjust for that here. |