From 5ac6f5c95d4a1a382059c7e8dda7a14ead09e46b Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Mon, 3 Oct 2016 12:28:27 -0700 Subject: [PATCH] Add key for sms_convert_destination_number Add the CarrierConfig key KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL and remove the old configs. Note that this value no longer needs to be a string-array, as CarrierConfigManager handles gid. Bug: 29873049 Change-Id: I3edbcf5329177f6b370d08a09318c35c55e5e052 --- api/current.txt | 1 + api/system-current.txt | 1 + api/test-current.txt | 1 + core/res/res/values-mcc204-mnc04/config.xml | 5 ----- core/res/res/values-mcc310-mnc004/config.xml | 3 --- core/res/res/values-mcc311-mnc480/config.xml | 3 --- core/res/res/values/config.xml | 16 ---------------- core/res/res/values/symbols.xml | 1 - .../android/telephony/CarrierConfigManager.java | 8 ++++++++ 9 files changed, 11 insertions(+), 28 deletions(-) diff --git a/api/current.txt b/api/current.txt index d062d9b01d535..56f0bb08ca19e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -36971,6 +36971,7 @@ package android.telephony { 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 7a69f766e30ab..7617cafda116a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -40062,6 +40062,7 @@ package android.telephony { 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 d4631c349fc33..9a21d460d3984 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -37052,6 +37052,7 @@ package android.telephony { 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 ddf0e9fa9a684..1d7a45b31eb64 100755 --- a/core/res/res/values-mcc204-mnc04/config.xml +++ b/core/res/res/values-mcc204-mnc04/config.xml @@ -32,10 +32,5 @@ --> 0 - - true;BAE0000000000000 - false - - true;BAE0000000000000 diff --git a/core/res/res/values-mcc310-mnc004/config.xml b/core/res/res/values-mcc310-mnc004/config.xml index cbe514514e367..63431a446ae5b 100755 --- a/core/res/res/values-mcc310-mnc004/config.xml +++ b/core/res/res/values-mcc310-mnc004/config.xml @@ -35,8 +35,5 @@ false - - true - true diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml index 714b3123c708f..1301c4dd2f0d7 100755 --- a/core/res/res/values-mcc311-mnc480/config.xml +++ b/core/res/res/values-mcc311-mnc480/config.xml @@ -60,9 +60,6 @@ --> 0 - - true - true diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 3d1acdf5f3a44..3d507b53594dd 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2328,22 +2328,6 @@ default scale-up transition. --> false - - - false - - 320dp diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 019a5e86ca797..76946db48246d 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2280,7 +2280,6 @@ - diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index deed6d4fee781..d5bc45e73f1b1 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -115,6 +115,13 @@ public class CarrierConfigManager { */ 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 @@ -1086,6 +1093,7 @@ public class CarrierConfigManager { 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);