diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-09-09 14:47:44 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-09-10 16:22:47 -0700 |
commit | 6ff91ffbbd1a31054966c983110357ebc6a1f4ba (patch) | |
tree | b5fd9dd006d48759c13e2765cb3ea00d31a875d7 | |
parent | 5c3af54f1364051c1a32915242ee1b2d45fe4feb (diff) | |
download | android_frameworks_opt_telephony-6ff91ffbbd1a31054966c983110357ebc6a1f4ba.tar.gz android_frameworks_opt_telephony-6ff91ffbbd1a31054966c983110357ebc6a1f4ba.tar.bz2 android_frameworks_opt_telephony-6ff91ffbbd1a31054966c983110357ebc6a1f4ba.zip |
Telephony: Don't show as roaming if new state isn't in service.
We can receive a regCode which states that we're currently roaming
when transitioning between operator registrations. However, if the
new service state doesn't have us registering to an operator and
being out of service, then showing the device as "roaming" may not
be the correct behavior. Instead, always show device as not roaming
if the new service state is an invalid registration.
TICKET: CRACKLING-542
Change-Id: I6f49175fcebb522909e1114e74d16323f518ba9a
-rw-r--r-- | src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java index 2b6d7c4f7..117d05407 100644 --- a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +++ b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java @@ -881,6 +881,13 @@ final class GsmServiceStateTracker extends ServiceStateTracker { roaming = true; } + // We can't really be roaming if we're not in service and not registered to an operator + // set us to false + if (mNewSS.getState() == ServiceState.STATE_OUT_OF_SERVICE && + mNewSS.getOperatorNumeric() == null) { + roaming = false; + } + mNewSS.setVoiceRoaming(roaming); mNewSS.setDataRoaming(roaming); |