am 6b178e47: Merge "Always assume evdoXxxx signal strength values are correct." into eclair
Merge commit '6b178e472266052b4a9b28b1e4a5cef07f1ebf8b' into eclair-plus-aosp * commit '6b178e472266052b4a9b28b1e4a5cef07f1ebf8b': Always assume evdoXxxx signal strength values are correct.
This commit is contained in:
@@ -1170,32 +1170,23 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
} else {
|
||||
int[] ints = (int[])ar.result;
|
||||
int offset = 2;
|
||||
|
||||
int cdmaDbm = (ints[offset] > 0) ? -ints[offset] : -120;
|
||||
int cdmaEcio = (ints[offset+1] > 0) ? -ints[offset+1] : -160;
|
||||
int evdoRssi = (ints[offset+2] > 0) ? -ints[offset+2] : -120;
|
||||
int evdoEcio = (ints[offset+3] > 0) ? -ints[offset+3] : -1;
|
||||
int evdoSnr = ((ints[offset+4] > 0) && (ints[offset+4] <= 8)) ? ints[offset+4] : -1;
|
||||
|
||||
int evdoRssi = -1;
|
||||
int evdoEcio = -1;
|
||||
int evdoSnr = -1;
|
||||
if ((networkType == ServiceState.RADIO_TECHNOLOGY_EVDO_0)
|
||||
|| (networkType == ServiceState.RADIO_TECHNOLOGY_EVDO_A)) {
|
||||
evdoRssi = (ints[offset+2] > 0) ? -ints[offset+2] : -120;
|
||||
evdoEcio = (ints[offset+3] > 0) ? -ints[offset+3] : -1;
|
||||
evdoSnr = ((ints[offset+4] > 0) && (ints[offset+4] <= 8)) ? ints[offset+4] : -1;
|
||||
}
|
||||
|
||||
//log(String.format("onSignalStrengthResult cdmaDbm=%d cdmaEcio=%d evdoRssi=%d evdoEcio=%d evdoSnr=%d",
|
||||
// cdmaDbm, cdmaEcio, evdoRssi, evdoEcio, evdoSnr));
|
||||
mSignalStrength = new SignalStrength(99, -1, cdmaDbm, cdmaEcio,
|
||||
evdoRssi, evdoEcio, evdoSnr, false);
|
||||
}
|
||||
|
||||
if (!mSignalStrength.equals(oldSignalStrength)) {
|
||||
try { // This takes care of delayed EVENT_POLL_SIGNAL_STRENGTH (scheduled after
|
||||
// POLL_PERIOD_MILLIS) during Radio Technology Change)
|
||||
phone.notifySignalStrength();
|
||||
} catch (NullPointerException ex) {
|
||||
log("onSignalStrengthResult() Phone already destroyed: " + ex
|
||||
+ "SignalStrength not notified");
|
||||
}
|
||||
try {
|
||||
phone.notifySignalStrength();
|
||||
} catch (NullPointerException ex) {
|
||||
log("onSignalStrengthResult() Phone already destroyed: " + ex
|
||||
+ "SignalStrength not notified");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user