Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +12 −26 Original line number Diff line number Diff line Loading @@ -437,40 +437,26 @@ public class GsmCdmaPhone extends Phone { tm.setSimOperatorNumericForPhone(mPhoneId, operatorNumeric); SubscriptionController.getInstance().setMccMnc(operatorNumeric, getSubId()); // Sets iso country property by retrieving from build-time system property setIsoCountryProperty(operatorNumeric); // Updates MCC MNC device configuration information logd("update mccmnc=" + operatorNumeric); MccTable.updateMccMncConfiguration(mContext, operatorNumeric); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); } } //CDMA /** * Sets PROPERTY_ICC_OPERATOR_ISO_COUNTRY property * */ private void setIsoCountryProperty(String operatorNumeric) { TelephonyManager tm = TelephonyManager.from(mContext); if (TextUtils.isEmpty(operatorNumeric)) { logd("setIsoCountryProperty: clear 'gsm.sim.operator.iso-country'"); tm.setSimCountryIsoForPhone(mPhoneId, ""); SubscriptionController.getInstance().setCountryIso("", getSubId()); } else { // Sets iso country property by retrieving from build-time system property String iso = ""; try { iso = MccTable.countryCodeForMcc(operatorNumeric.substring(0, 3)); } catch (StringIndexOutOfBoundsException ex) { Rlog.e(LOG_TAG, "setIsoCountryProperty: countryCodeForMcc error", ex); Rlog.e(LOG_TAG, "init: countryCodeForMcc error", ex); } logd("setIsoCountryProperty: set 'gsm.sim.operator.iso-country' to iso=" + iso); logd("init: set 'gsm.sim.operator.iso-country' to iso=" + iso); tm.setSimCountryIsoForPhone(mPhoneId, iso); SubscriptionController.getInstance().setCountryIso(iso, getSubId()); // Updates MCC MNC device configuration information logd("update mccmnc=" + operatorNumeric); MccTable.updateMccMncConfiguration(mContext, operatorNumeric); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); } } Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +12 −26 Original line number Diff line number Diff line Loading @@ -437,40 +437,26 @@ public class GsmCdmaPhone extends Phone { tm.setSimOperatorNumericForPhone(mPhoneId, operatorNumeric); SubscriptionController.getInstance().setMccMnc(operatorNumeric, getSubId()); // Sets iso country property by retrieving from build-time system property setIsoCountryProperty(operatorNumeric); // Updates MCC MNC device configuration information logd("update mccmnc=" + operatorNumeric); MccTable.updateMccMncConfiguration(mContext, operatorNumeric); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); } } //CDMA /** * Sets PROPERTY_ICC_OPERATOR_ISO_COUNTRY property * */ private void setIsoCountryProperty(String operatorNumeric) { TelephonyManager tm = TelephonyManager.from(mContext); if (TextUtils.isEmpty(operatorNumeric)) { logd("setIsoCountryProperty: clear 'gsm.sim.operator.iso-country'"); tm.setSimCountryIsoForPhone(mPhoneId, ""); SubscriptionController.getInstance().setCountryIso("", getSubId()); } else { // Sets iso country property by retrieving from build-time system property String iso = ""; try { iso = MccTable.countryCodeForMcc(operatorNumeric.substring(0, 3)); } catch (StringIndexOutOfBoundsException ex) { Rlog.e(LOG_TAG, "setIsoCountryProperty: countryCodeForMcc error", ex); Rlog.e(LOG_TAG, "init: countryCodeForMcc error", ex); } logd("setIsoCountryProperty: set 'gsm.sim.operator.iso-country' to iso=" + iso); logd("init: set 'gsm.sim.operator.iso-country' to iso=" + iso); tm.setSimCountryIsoForPhone(mPhoneId, iso); SubscriptionController.getInstance().setCountryIso(iso, getSubId()); // Updates MCC MNC device configuration information logd("update mccmnc=" + operatorNumeric); MccTable.updateMccMncConfiguration(mContext, operatorNumeric); } // Sets current entry in the telephony carrier table updateCurrentCarrierInProvider(operatorNumeric); } } Loading