summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorYong Zhang <yzhang@motorola.com>2009-07-22 17:25:30 -0500
committerWink Saville <wink@google.com>2009-07-29 20:39:52 -0700
commit96f2747dd6fabd998619524bcff4a44502a64bbd (patch)
treea1a04df65bdf3f1c1218b12612630c85a85d6b63 /services
parent206b7b1709e98952576821cd2ee8867f2265b6aa (diff)
downloadframeworks_base-96f2747dd6fabd998619524bcff4a44502a64bbd.zip
frameworks_base-96f2747dd6fabd998619524bcff4a44502a64bbd.tar.gz
frameworks_base-96f2747dd6fabd998619524bcff4a44502a64bbd.tar.bz2
Fix wrong Singal Strength interpretation.
The issue this change fixes is that phone status bar shows full signal strength bar even when phone is in bad signal area. The root cause is that the signal strenth is incorrectly interpreted.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/status/StatusBarPolicy.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index 33e793b..5aed396 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -926,17 +926,16 @@ public class StatusBarPolicy {
// Use Evdo icon
evdoIconList = this.sSignalImages_evdo;
- int evdoEcio = mSignalStrength.getEvdoEcio();
+ int evdoDbm = mSignalStrength.getEvdoDbm();
int evdoSnr = mSignalStrength.getEvdoSnr();
- int levelEvdoEcio = 0;
+ int levelEvdoDbm = 0;
int levelEvdoSnr = 0;
- // Ec/Io are in dB*10
- if (evdoEcio >= -650) levelEvdoEcio = 4;
- else if (evdoEcio >= -750) levelEvdoEcio = 3;
- else if (evdoEcio >= -900) levelEvdoEcio = 2;
- else if (evdoEcio >= -1050) levelEvdoEcio = 1;
- else levelEvdoEcio = 0;
+ if (evdoDbm >= -65) levelEvdoDbm = 4;
+ else if (evdoDbm >= -75) levelEvdoDbm = 3;
+ else if (evdoDbm >= -90) levelEvdoDbm = 2;
+ else if (evdoDbm >= -105) levelEvdoDbm = 1;
+ else levelEvdoDbm = 0;
if (evdoSnr > 7) levelEvdoSnr = 4;
else if (evdoSnr > 5) levelEvdoSnr = 3;
@@ -944,7 +943,7 @@ public class StatusBarPolicy {
else if (evdoSnr > 1) levelEvdoSnr = 1;
else levelEvdoSnr = 0;
- evdoIconLevel = (levelEvdoEcio < levelEvdoSnr) ? levelEvdoEcio : levelEvdoSnr;
+ evdoIconLevel = (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr;
mPhoneEvdoData.iconId = evdoIconList[evdoIconLevel];
mService.updateIcon(mPhoneEvdoIcon, mPhoneEvdoData, null);