summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorRobert Greenwalt <robdroid@android.com>2009-09-16 17:17:16 -0700
committerRobert Greenwalt <robdroid@android.com>2009-09-16 17:17:16 -0700
commit4282a5bad44b1b994a26a8eb02051f29f410d33a (patch)
treead33e76b4477b324e4bb2659500175c35a14ab45 /wifi
parent32c687c20d6ac3080b396787147892dc85126b33 (diff)
downloadframeworks_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.java2
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.