Loading src/java/com/android/internal/telephony/cdma/CDMALTEPhone.java +21 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,27 @@ public class CDMALTEPhone extends CDMAPhone { } /** * Sets the "current" field in the telephony provider according to the * build-time operator numeric property * * @return true for success; false otherwise. */ @Override boolean updateCurrentCarrierInProvider(String operatorNumeric) { boolean retVal; if (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null) { if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null"); retVal = super.updateCurrentCarrierInProvider(operatorNumeric); } else { if (DBG) log("updateCurrentCarrierInProvider not updated"); retVal = true; } if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal); return retVal; } @Override public boolean updateCurrentCarrierInProvider() { if (mSimRecords != null) { Loading src/java/com/android/internal/telephony/cdma/CDMAPhone.java +24 −14 Original line number Diff line number Diff line Loading @@ -195,21 +195,23 @@ public class CDMAPhone extends PhoneBase { mCarrierOtaSpNumSchema = SystemProperties.get( TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA,""); // Sets operator alpha property by retrieving from build-time system property // Sets operator properties by retrieving from build-time system property String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha"); setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); // Sets operator numeric property by retrieving from build-time system property String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC); if (!TextUtils.isEmpty(operatorNumeric) && (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null)) { log("CDMAPhone: init set 'gsm.sim.operator.numeric' to operator='" + operatorNumeric + "'"); log("init: operatorAlpha='" + operatorAlpha + "' operatorNumeric='" + operatorNumeric + "'"); if (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null) { log("init: APP_FAM_3GPP == NULL"); if (!TextUtils.isEmpty(operatorAlpha)) { log("init: set 'gsm.sim.operator.alpha' to operator='" + operatorAlpha + "'"); setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); } if (!TextUtils.isEmpty(operatorNumeric)) { log("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); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); Loading Loading @@ -1543,6 +1545,7 @@ public class CDMAPhone extends PhoneBase { */ private void setIsoCountryProperty(String operatorNumeric) { if (TextUtils.isEmpty(operatorNumeric)) { log("setIsoCountryProperty: clear 'gsm.sim.operator.iso-country'"); setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, ""); } else { String iso = ""; Loading @@ -1550,11 +1553,12 @@ public class CDMAPhone extends PhoneBase { iso = MccTable.countryCodeForMcc(Integer.parseInt( operatorNumeric.substring(0,3))); } catch (NumberFormatException ex) { Rlog.w(LOG_TAG, "countryCodeForMcc error" + ex); loge("setIsoCountryProperty: countryCodeForMcc error", ex); } catch (StringIndexOutOfBoundsException ex) { Rlog.w(LOG_TAG, "countryCodeForMcc error" + ex); loge("setIsoCountryProperty: countryCodeForMcc error", ex); } log("setIsoCountryProperty: set 'gsm.sim.operator.iso-country' to iso=" + iso); setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso); } } Loading @@ -1566,6 +1570,7 @@ public class CDMAPhone extends PhoneBase { * @return true for success; false otherwise. */ boolean updateCurrentCarrierInProvider(String operatorNumeric) { log("CDMAPhone: updateCurrentCarrierInProvider called"); if (!TextUtils.isEmpty(operatorNumeric)) { try { Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"); Loading Loading @@ -1631,6 +1636,11 @@ public class CDMAPhone extends PhoneBase { Rlog.d(LOG_TAG, s); } protected void loge(String s, Exception e) { if (DBG) Rlog.e(LOG_TAG, s, e); } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("CDMAPhone extends:"); Loading Loading
src/java/com/android/internal/telephony/cdma/CDMALTEPhone.java +21 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,27 @@ public class CDMALTEPhone extends CDMAPhone { } /** * Sets the "current" field in the telephony provider according to the * build-time operator numeric property * * @return true for success; false otherwise. */ @Override boolean updateCurrentCarrierInProvider(String operatorNumeric) { boolean retVal; if (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null) { if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null"); retVal = super.updateCurrentCarrierInProvider(operatorNumeric); } else { if (DBG) log("updateCurrentCarrierInProvider not updated"); retVal = true; } if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal); return retVal; } @Override public boolean updateCurrentCarrierInProvider() { if (mSimRecords != null) { Loading
src/java/com/android/internal/telephony/cdma/CDMAPhone.java +24 −14 Original line number Diff line number Diff line Loading @@ -195,21 +195,23 @@ public class CDMAPhone extends PhoneBase { mCarrierOtaSpNumSchema = SystemProperties.get( TelephonyProperties.PROPERTY_OTASP_NUM_SCHEMA,""); // Sets operator alpha property by retrieving from build-time system property // Sets operator properties by retrieving from build-time system property String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha"); setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); // Sets operator numeric property by retrieving from build-time system property String operatorNumeric = SystemProperties.get(PROPERTY_CDMA_HOME_OPERATOR_NUMERIC); if (!TextUtils.isEmpty(operatorNumeric) && (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null)) { log("CDMAPhone: init set 'gsm.sim.operator.numeric' to operator='" + operatorNumeric + "'"); log("init: operatorAlpha='" + operatorAlpha + "' operatorNumeric='" + operatorNumeric + "'"); if (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null) { log("init: APP_FAM_3GPP == NULL"); if (!TextUtils.isEmpty(operatorAlpha)) { log("init: set 'gsm.sim.operator.alpha' to operator='" + operatorAlpha + "'"); setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha); } if (!TextUtils.isEmpty(operatorNumeric)) { log("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); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); Loading Loading @@ -1543,6 +1545,7 @@ public class CDMAPhone extends PhoneBase { */ private void setIsoCountryProperty(String operatorNumeric) { if (TextUtils.isEmpty(operatorNumeric)) { log("setIsoCountryProperty: clear 'gsm.sim.operator.iso-country'"); setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, ""); } else { String iso = ""; Loading @@ -1550,11 +1553,12 @@ public class CDMAPhone extends PhoneBase { iso = MccTable.countryCodeForMcc(Integer.parseInt( operatorNumeric.substring(0,3))); } catch (NumberFormatException ex) { Rlog.w(LOG_TAG, "countryCodeForMcc error" + ex); loge("setIsoCountryProperty: countryCodeForMcc error", ex); } catch (StringIndexOutOfBoundsException ex) { Rlog.w(LOG_TAG, "countryCodeForMcc error" + ex); loge("setIsoCountryProperty: countryCodeForMcc error", ex); } log("setIsoCountryProperty: set 'gsm.sim.operator.iso-country' to iso=" + iso); setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso); } } Loading @@ -1566,6 +1570,7 @@ public class CDMAPhone extends PhoneBase { * @return true for success; false otherwise. */ boolean updateCurrentCarrierInProvider(String operatorNumeric) { log("CDMAPhone: updateCurrentCarrierInProvider called"); if (!TextUtils.isEmpty(operatorNumeric)) { try { Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"); Loading Loading @@ -1631,6 +1636,11 @@ public class CDMAPhone extends PhoneBase { Rlog.d(LOG_TAG, s); } protected void loge(String s, Exception e) { if (DBG) Rlog.e(LOG_TAG, s, e); } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("CDMAPhone extends:"); Loading