telephony: Fix "R" icon displayed when device is searching or in LTE
Wink Saville [Wed, 16 Oct 2013 02:11:51 +0000 (19:11 -0700)]
Bug: 10745813, 10771508
Change-Id: I6741e14785484fe6af19d60487f4d545e568ccf9

src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java

index 42a3aa7..7ad0757 100644 (file)
@@ -801,14 +801,23 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
             if (TextUtils.isEmpty(mPrlVersion)) {
                 isPrlLoaded = false;
             }
-            if (!isPrlLoaded) {
+            if (!isPrlLoaded || (mNewSS.getRilVoiceRadioTechnology()
+                                        == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
+                log("Turn off roaming indicator if !isPrlLoaded or voice RAT is unknown");
                 mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
             } else if (!isSidsAllZeros()) {
                 if (!namMatch && !mIsInPrl) {
                     // Use default
                     mNewSS.setCdmaRoamingIndicator(mDefaultRoamingIndicator);
                 } else if (namMatch && !mIsInPrl) {
-                    mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_FLASH);
+                    // TODO this will be removed when we handle roaming on LTE on CDMA+LTE phones
+                    if (mNewSS.getRilVoiceRadioTechnology()
+                            == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) {
+                        log("Turn off roaming indicator as voice is LTE");
+                        mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
+                    } else {
+                        mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_FLASH);
+                    }
                 } else if (!namMatch && mIsInPrl) {
                     // Use the one from PRL/ERI
                     mNewSS.setCdmaRoamingIndicator(mRoamingIndicator);