Merge "Add key for sms_convert_destination_number"
diff --git a/api/current.txt b/api/current.txt
index dde27d0..2beea12 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -36982,6 +36982,7 @@
     field public static final java.lang.String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool";
     field public static final java.lang.String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool";
     field public static final java.lang.String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool";
+    field public static final java.lang.String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL = "sms_requires_destination_number_conversion_bool";
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
diff --git a/api/system-current.txt b/api/system-current.txt
index 649b020..db8a501 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -40074,6 +40074,7 @@
     field public static final java.lang.String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool";
     field public static final java.lang.String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool";
     field public static final java.lang.String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool";
+    field public static final java.lang.String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL = "sms_requires_destination_number_conversion_bool";
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
diff --git a/api/test-current.txt b/api/test-current.txt
index 690b27d1..e9f2f0e 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -37063,6 +37063,7 @@
     field public static final java.lang.String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool";
     field public static final java.lang.String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool";
     field public static final java.lang.String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool";
+    field public static final java.lang.String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL = "sms_requires_destination_number_conversion_bool";
     field public static final java.lang.String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool";
     field public static final java.lang.String KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
     field public static final java.lang.String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
diff --git a/core/res/res/values-mcc204-mnc04/config.xml b/core/res/res/values-mcc204-mnc04/config.xml
index ddf0e9f..1d7a45b 100755
--- a/core/res/res/values-mcc204-mnc04/config.xml
+++ b/core/res/res/values-mcc204-mnc04/config.xml
@@ -32,10 +32,5 @@
     -->
     <integer name="config_LTE_RSRP_threshold_type">0</integer>
 
-    <string-array translatable="false" name="config_sms_convert_destination_number_support">
-        <item>true;BAE0000000000000</item>
-        <item>false</item>
-    </string-array>
-
     <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true;BAE0000000000000</string>
 </resources>
diff --git a/core/res/res/values-mcc310-mnc004/config.xml b/core/res/res/values-mcc310-mnc004/config.xml
index cbe5145..63431a4 100755
--- a/core/res/res/values-mcc310-mnc004/config.xml
+++ b/core/res/res/values-mcc310-mnc004/config.xml
@@ -35,8 +35,5 @@
 
     <bool name="config_auto_attach_data_on_creation">false</bool>
 
-    <string-array translatable="false" name="config_sms_convert_destination_number_support">
-        <item>true</item>
-    </string-array>
     <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true</string>
 </resources>
diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml
index 439f1d6..a0a361b 100755
--- a/core/res/res/values-mcc311-mnc480/config.xml
+++ b/core/res/res/values-mcc311-mnc480/config.xml
@@ -57,9 +57,6 @@
     -->
     <integer name="config_LTE_RSRP_threshold_type">0</integer>
 
-    <string-array translatable="false" name="config_sms_convert_destination_number_support">
-        <item>true</item>
-    </string-array>
     <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true</string>
 
 </resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index c52051d..092109b 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2333,22 +2333,6 @@
          default scale-up transition. -->
     <bool name="config_overrideRemoteViewsActivityTransition">false</bool>
 
-    <!-- This config is used to check if the carrier requires converting destination
-         number before sending out a SMS.
-         Formats for this configuration as below:
-         [true or false][;optional gid]
-         The logic to pick up the configuration:
-         (1) If the "config_sms_convert_destination_number_support" array has no gid
-             special item, the last one will be picked
-         (2) If the "config_sms_convert_destination_number_support" array has gid special
-             item and it matches the current sim's gid, it will be picked.
-         (3) If the "config_sms_convert_destination_number_support" array has gid special
-             item but it doesn't match the current sim's gid, the last one without gid
-             will be picked -->
-    <string-array translatable="false" name="config_sms_convert_destination_number_support">
-        <item>false</item>
-    </string-array>
-
     <!-- The maximum bitmap size that can be written to a MediaMetadata object. This value
          is the max width/height allowed in dips.-->
     <dimen name="config_mediaMetadataBitmapMaxSize">320dp</dimen>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 04654b0..ad3e204 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2279,7 +2279,6 @@
   <java-symbol type="bool" name="config_overrideRemoteViewsActivityTransition" />
 
   <java-symbol type="layout" name="simple_account_item" />
-  <java-symbol type="array" name="config_sms_convert_destination_number_support" />
   <java-symbol type="string" name="prohibit_manual_network_selection_in_gobal_mode" />
   <java-symbol type="id" name="profile_button" />
 
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 31ea1d1..04d680e 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -123,6 +123,13 @@
     public static final String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_bool";
 
     /**
+     * Determines if the carrier requires converting the destination number before sending out an
+     * SMS. Certain networks and numbering plans require different formats.
+     */
+    public static final String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL=
+            "sms_requires_destination_number_conversion_bool";
+
+    /**
      * If true, show an onscreen "Dial" button in the dialer. In practice this is used on all
      * platforms, even the ones with hard SEND/END keys, but for maximum flexibility it's controlled
      * by a flag here (which can be overridden on a per-product basis.)
@@ -1113,6 +1120,7 @@
         sDefaults.putBoolean(KEY_PREFER_2G_BOOL, true);
         sDefaults.putBoolean(KEY_SHOW_APN_SETTING_CDMA_BOOL, false);
         sDefaults.putBoolean(KEY_SHOW_CDMA_CHOICES_BOOL, false);
+        sDefaults.putBoolean(KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL, false);
         sDefaults.putBoolean(KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL, true);
         sDefaults.putBoolean(KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL, true);
         sDefaults.putBoolean(KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL, false);