Loading src/java/com/android/internal/telephony/uicc/UiccProfile.java +16 −4 Original line number Diff line number Diff line Loading @@ -338,16 +338,28 @@ public class UiccProfile extends IccCard { boolean preferCcName = config.getBoolean( CarrierConfigManager.KEY_CARRIER_NAME_OVERRIDE_BOOL, false); String ccName = config.getString(CarrierConfigManager.KEY_CARRIER_NAME_STRING); String newCarrierName = null; String currSpn = getServiceProviderName(); // If carrier config is priority, use it regardless - the preference // and the name were both set by the carrier, so this is safe; // otherwise, if the SPN is priority but we don't have one *and* we have // a name in carrier config, use the carrier config name as a backup. if (preferCcName || (TextUtils.isEmpty(getServiceProviderName()) && !TextUtils.isEmpty(ccName))) { if (preferCcName || (TextUtils.isEmpty(currSpn) && !TextUtils.isEmpty(ccName))) { newCarrierName = ccName; } else if (TextUtils.isEmpty(currSpn)) { // currSpn is empty and could not get name from carrier config; get name from carrier id Phone phone = PhoneFactory.getPhone(mPhoneId); if (phone != null) { newCarrierName = phone.getCarrierName(); } } if (!TextUtils.isEmpty(newCarrierName)) { if (mIccRecords != null) { mIccRecords.setServiceProviderName(ccName); mIccRecords.setServiceProviderName(newCarrierName); } mTelephonyManager.setSimOperatorNameForPhone(mPhoneId, ccName); mTelephonyManager.setSimOperatorNameForPhone(mPhoneId, newCarrierName); mOperatorBrandOverrideRegistrants.notifyRegistrants(); } Loading Loading
src/java/com/android/internal/telephony/uicc/UiccProfile.java +16 −4 Original line number Diff line number Diff line Loading @@ -338,16 +338,28 @@ public class UiccProfile extends IccCard { boolean preferCcName = config.getBoolean( CarrierConfigManager.KEY_CARRIER_NAME_OVERRIDE_BOOL, false); String ccName = config.getString(CarrierConfigManager.KEY_CARRIER_NAME_STRING); String newCarrierName = null; String currSpn = getServiceProviderName(); // If carrier config is priority, use it regardless - the preference // and the name were both set by the carrier, so this is safe; // otherwise, if the SPN is priority but we don't have one *and* we have // a name in carrier config, use the carrier config name as a backup. if (preferCcName || (TextUtils.isEmpty(getServiceProviderName()) && !TextUtils.isEmpty(ccName))) { if (preferCcName || (TextUtils.isEmpty(currSpn) && !TextUtils.isEmpty(ccName))) { newCarrierName = ccName; } else if (TextUtils.isEmpty(currSpn)) { // currSpn is empty and could not get name from carrier config; get name from carrier id Phone phone = PhoneFactory.getPhone(mPhoneId); if (phone != null) { newCarrierName = phone.getCarrierName(); } } if (!TextUtils.isEmpty(newCarrierName)) { if (mIccRecords != null) { mIccRecords.setServiceProviderName(ccName); mIccRecords.setServiceProviderName(newCarrierName); } mTelephonyManager.setSimOperatorNameForPhone(mPhoneId, ccName); mTelephonyManager.setSimOperatorNameForPhone(mPhoneId, newCarrierName); mOperatorBrandOverrideRegistrants.notifyRegistrants(); } Loading