am 2f20df19: Merge change 25398 into eclair

Merge commit '2f20df194f9b5e58abc67998a556d3ab2d51ffaf' into eclair-plus-aosp

* commit '2f20df194f9b5e58abc67998a556d3ab2d51ffaf':
  Reintroduce wifi RssiApprox, reducing driver calls
This commit is contained in:
Robert Greenwalt
2009-09-17 08:43:48 -07:00
committed by Android Git Automerger

View File

@@ -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.