UICC: to avoid overwriting ICC operator numeric
duho.ro [Mon, 16 Sep 2013 20:54:24 +0000 (05:54 +0900)]
When the SIM card is inserted and the radio tech is CDMA,
init() of CDMAPhone overwrites the ICC operator numeric as
CDMA_HOME_OPERATOR_NUMERIC. It makes some abnormal state when the
CDMA_HOME_OPERATOR_NUMERIC has a wrong value or empty.
This change is skipping the overwriting ICC operator numeric when UICC
card has a SIM/USIM application because the application has its own
operator numeric.

Bug: 10774885
Change-Id: I0171000ef38fad23858f7266ab0cae3bd314b6b1

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

index d50fba6..8fdaf38 100644 (file)
@@ -234,9 +234,12 @@ public class CDMAPhone extends PhoneBase {
 
         // Sets operator numeric property by retrieving from build-time system property
         String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC);
-        log("CDMAPhone: init set 'gsm.sim.operator.numeric' to operator='" +
-                operatorNumeric + "'");
-        setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric);
+        if (!TextUtils.isEmpty(operatorNumeric) &&
+            (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null)) {
+            log("CDMAPhone: init set 'gsm.sim.operator.numeric' to operator='" +
+                    operatorNumeric + "'");
+            setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric);
+        }
 
         // Sets iso country property by retrieving from build-time system property
         setIsoCountryProperty(operatorNumeric);