diff options
Diffstat (limited to 'telephony/java')
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 7 | ||||
| -rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 9dc94c8..6a0bf64 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -357,6 +357,12 @@ public class CarrierConfigManager { public static final String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool"; /** + * Determine whether user can toggle Enhanced 4G LTE Mode in Settings. + * @hide + */ + public static final String KEY_EDITABLE_ENHANCED_4G_LTE_BOOL = "editable_enhanced_4g_lte_bool"; + + /** * If this is true, the SIM card (through Customer Service Profile EF file) will be able to * prevent manual operator selection. If false, this SIM setting will be ignored and manual * operator selection will always be available. See CPHS4_2.WW6, CPHS B.4.7.1 for more @@ -456,6 +462,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_FORCE_HOME_NETWORK_BOOL, false); sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0); sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true); + sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true); // MMS defaults sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false); diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 79146f3..273cc93 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1135,6 +1135,8 @@ public class PhoneNumberUtils "VI", // U.S. Virgin Islands }; + private static final String KOREA_ISO_COUNTRY_CODE = "KR"; + /** * Breaks the given number down and formats it according to the rules * for the country the number is from. @@ -1455,7 +1457,14 @@ public class PhoneNumberUtils String result = null; try { PhoneNumber pn = util.parseAndKeepRawInput(phoneNumber, defaultCountryIso); - result = util.formatInOriginalFormat(pn, defaultCountryIso); + if (KOREA_ISO_COUNTRY_CODE.equals(defaultCountryIso) && + (pn.getCountryCode() == util.getCountryCodeForRegion(KOREA_ISO_COUNTRY_CODE))) { + // Format local Korean phone numbers with country code to corresponding national + // format which would replace the leading +82 with 0. + result = util.format(pn, PhoneNumberUtil.PhoneNumberFormat.NATIONAL); + } else { + result = util.formatInOriginalFormat(pn, defaultCountryIso); + } } catch (NumberParseException e) { } return result; |
