Loading wifi/java/android/net/wifi/WifiStateTracker.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1333,9 +1333,12 @@ public class WifiStateTracker extends NetworkStateTracker { */ */ private synchronized void requestPolledInfo(WifiInfo info, boolean polling) private synchronized void requestPolledInfo(WifiInfo info, boolean polling) { { int newRssi = (polling ? WifiNative.getRssiApproxCommand(): int newRssi = WifiNative.getRssiCommand(); WifiNative.getRssiCommand()); if (newRssi != -1 && -200 < newRssi && newRssi < 256) { // screen out invalid values if (newRssi != -1 && -200 < newRssi && newRssi < 100) { // screen out invalid values /* some implementations avoid negative values by adding 256 * so we need to adjust for that here. */ if (newRssi > 0) newRssi -= 256; info.setRssi(newRssi); info.setRssi(newRssi); /* /* * Rather then sending the raw RSSI out every time it * Rather then sending the raw RSSI out every time it Loading Loading
wifi/java/android/net/wifi/WifiStateTracker.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1333,9 +1333,12 @@ public class WifiStateTracker extends NetworkStateTracker { */ */ private synchronized void requestPolledInfo(WifiInfo info, boolean polling) private synchronized void requestPolledInfo(WifiInfo info, boolean polling) { { int newRssi = (polling ? WifiNative.getRssiApproxCommand(): int newRssi = WifiNative.getRssiCommand(); WifiNative.getRssiCommand()); if (newRssi != -1 && -200 < newRssi && newRssi < 256) { // screen out invalid values if (newRssi != -1 && -200 < newRssi && newRssi < 100) { // screen out invalid values /* some implementations avoid negative values by adding 256 * so we need to adjust for that here. */ if (newRssi > 0) newRssi -= 256; info.setRssi(newRssi); info.setRssi(newRssi); /* /* * Rather then sending the raw RSSI out every time it * Rather then sending the raw RSSI out every time it Loading