diff options
author | Jonathan Basseri <misterikkit@google.com> | 2015-05-27 01:18:46 -0700 |
---|---|---|
committer | Jonathan Basseri <misterikkit@google.com> | 2015-06-02 10:08:08 -0700 |
commit | 9444f4be82d2bbc6b8668e73e91cfa70aee2d4dc (patch) | |
tree | 7d735b430d559034c259d7caf5e1039fbb14d8fc | |
parent | 5431000830551959db15038da8f057c2e993d01a (diff) | |
download | frameworks_base-9444f4be82d2bbc6b8668e73e91cfa70aee2d4dc.zip frameworks_base-9444f4be82d2bbc6b8668e73e91cfa70aee2d4dc.tar.gz frameworks_base-9444f4be82d2bbc6b8668e73e91cfa70aee2d4dc.tar.bz2 |
Migrating MmsConfig to CarrierConfigManager.
Define variables in CarrierConfigManager that mirror those in
SmsManager. These will replace MmsConfig. The literal values had to be
moved into this class because classes in frameworks/base/telephony
cannot reference classes in frameworks/opt/telephony.
There is no change to the SmsManager API, but the data available from
SmsManager#getCarrierConfigValues is moving from mms_config.xml files
into the new carrier config API.
Bug: 21085630
Change-Id: I8a88f46c770ddcb3ac6988c29d86f0ca1f211f4a
-rw-r--r-- | api/current.txt | 32 | ||||
-rw-r--r-- | api/system-current.txt | 32 | ||||
-rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 69 |
3 files changed, 132 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt index d38e75a..2d248ba 100644 --- a/api/current.txt +++ b/api/current.txt @@ -30624,6 +30624,20 @@ package android.telephony { field public static final java.lang.String BOOL_HAS_IN_CALL_NOISE_SUPPRESSION = "bool_has_in_call_noise_suppression"; field public static final java.lang.String BOOL_HIDE_CARRIER_NETWORK_SETTINGS = "bool_hide_carrier_network_settings"; field public static final java.lang.String BOOL_IGNORE_SIM_NETWORK_LOCKED_EVENTS = "bool_ignore_sim_network_locked_events"; + field public static final java.lang.String BOOL_MMS_ALIAS_ENABLED = "aliasEnabled"; + field public static final java.lang.String BOOL_MMS_ALLOW_ATTACH_AUDIO = "allowAttachAudio"; + field public static final java.lang.String BOOL_MMS_APPEND_TRANSACTION_ID = "enabledTransID"; + field public static final java.lang.String BOOL_MMS_GROUP_MMS_ENABLED = "enableGroupMms"; + field public static final java.lang.String BOOL_MMS_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports"; + field public static final java.lang.String BOOL_MMS_MMS_ENABLED = "enabledMMS"; + field public static final java.lang.String BOOL_MMS_MMS_READ_REPORT_ENABLED = "enableMMSReadReports"; + field public static final java.lang.String BOOL_MMS_MULTIPART_SMS_ENABLED = "enableMultipartSMS"; + field public static final java.lang.String BOOL_MMS_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC"; + field public static final java.lang.String BOOL_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages"; + field public static final java.lang.String BOOL_MMS_SHOW_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks"; + field public static final java.lang.String BOOL_MMS_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports"; + field public static final java.lang.String BOOL_MMS_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader"; + field public static final java.lang.String BOOL_MMS_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition"; field public static final java.lang.String BOOL_OPERATOR_SELECTION_EXPAND = "bool_operator_selection_expand"; field public static final java.lang.String BOOL_PREFER_2G = "bool_prefer_2g"; field public static final java.lang.String BOOL_SHOW_APN_SETTING_CDMA = "bool_show_apn_setting_cdma"; @@ -30637,7 +30651,24 @@ package android.telephony { field public static final java.lang.String BOOL_VOICEMAIL_NOTIFICATION_PERSISTENT = "bool_voicemail_notification_persistent"; field public static final java.lang.String BOOL_VOICE_PRIVACY_DISABLE = "bool_voice_privacy_disable"; field public static final java.lang.String BOOL_WORLD_PHONE = "bool_world_phone"; + field public static final java.lang.String INT_MMS_ALIAS_MAX_CHARS = "aliasMaxChars"; + field public static final java.lang.String INT_MMS_ALIAS_MIN_CHARS = "aliasMinChars"; + field public static final java.lang.String INT_MMS_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout"; + field public static final java.lang.String INT_MMS_MAX_IMAGE_HEIGHT = "maxImageHeight"; + field public static final java.lang.String INT_MMS_MAX_IMAGE_WIDTH = "maxImageWidth"; + field public static final java.lang.String INT_MMS_MAX_MESSAGE_SIZE = "maxMessageSize"; + field public static final java.lang.String INT_MMS_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize"; + field public static final java.lang.String INT_MMS_RECIPIENT_LIMIT = "recipientLimit"; + field public static final java.lang.String INT_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold"; + field public static final java.lang.String INT_MMS_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold"; + field public static final java.lang.String INT_MMS_SUBJECT_MAX_LENGTH = "maxSubjectLength"; field public static final java.lang.String INT_VOLTE_REPLACEMENT_RAT = "int_volte_replacement_rat"; + field public static final java.lang.String STRING_MMS_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber"; + field public static final java.lang.String STRING_MMS_HTTP_PARAMS = "httpParams"; + field public static final java.lang.String STRING_MMS_NAI_SUFFIX = "naiSuffix"; + field public static final java.lang.String STRING_MMS_UA_PROF_TAG_NAME = "uaProfTagName"; + field public static final java.lang.String STRING_MMS_UA_PROF_URL = "uaProfUrl"; + field public static final java.lang.String STRING_MMS_USER_AGENT = "userAgent"; } public final class CellIdentityCdma implements android.os.Parcelable { @@ -30987,6 +31018,7 @@ package android.telephony { field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold"; field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold"; field public static final java.lang.String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength"; + field public static final java.lang.String MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader"; field public static final java.lang.String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition"; field public static final java.lang.String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName"; field public static final java.lang.String MMS_CONFIG_UA_PROF_URL = "uaProfUrl"; diff --git a/api/system-current.txt b/api/system-current.txt index 44d8c8e..fc89d0b 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -32833,6 +32833,20 @@ package android.telephony { field public static final java.lang.String BOOL_HAS_IN_CALL_NOISE_SUPPRESSION = "bool_has_in_call_noise_suppression"; field public static final java.lang.String BOOL_HIDE_CARRIER_NETWORK_SETTINGS = "bool_hide_carrier_network_settings"; field public static final java.lang.String BOOL_IGNORE_SIM_NETWORK_LOCKED_EVENTS = "bool_ignore_sim_network_locked_events"; + field public static final java.lang.String BOOL_MMS_ALIAS_ENABLED = "aliasEnabled"; + field public static final java.lang.String BOOL_MMS_ALLOW_ATTACH_AUDIO = "allowAttachAudio"; + field public static final java.lang.String BOOL_MMS_APPEND_TRANSACTION_ID = "enabledTransID"; + field public static final java.lang.String BOOL_MMS_GROUP_MMS_ENABLED = "enableGroupMms"; + field public static final java.lang.String BOOL_MMS_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports"; + field public static final java.lang.String BOOL_MMS_MMS_ENABLED = "enabledMMS"; + field public static final java.lang.String BOOL_MMS_MMS_READ_REPORT_ENABLED = "enableMMSReadReports"; + field public static final java.lang.String BOOL_MMS_MULTIPART_SMS_ENABLED = "enableMultipartSMS"; + field public static final java.lang.String BOOL_MMS_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC"; + field public static final java.lang.String BOOL_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages"; + field public static final java.lang.String BOOL_MMS_SHOW_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks"; + field public static final java.lang.String BOOL_MMS_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports"; + field public static final java.lang.String BOOL_MMS_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader"; + field public static final java.lang.String BOOL_MMS_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition"; field public static final java.lang.String BOOL_OPERATOR_SELECTION_EXPAND = "bool_operator_selection_expand"; field public static final java.lang.String BOOL_PREFER_2G = "bool_prefer_2g"; field public static final java.lang.String BOOL_SHOW_APN_SETTING_CDMA = "bool_show_apn_setting_cdma"; @@ -32846,7 +32860,24 @@ package android.telephony { field public static final java.lang.String BOOL_VOICEMAIL_NOTIFICATION_PERSISTENT = "bool_voicemail_notification_persistent"; field public static final java.lang.String BOOL_VOICE_PRIVACY_DISABLE = "bool_voice_privacy_disable"; field public static final java.lang.String BOOL_WORLD_PHONE = "bool_world_phone"; + field public static final java.lang.String INT_MMS_ALIAS_MAX_CHARS = "aliasMaxChars"; + field public static final java.lang.String INT_MMS_ALIAS_MIN_CHARS = "aliasMinChars"; + field public static final java.lang.String INT_MMS_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout"; + field public static final java.lang.String INT_MMS_MAX_IMAGE_HEIGHT = "maxImageHeight"; + field public static final java.lang.String INT_MMS_MAX_IMAGE_WIDTH = "maxImageWidth"; + field public static final java.lang.String INT_MMS_MAX_MESSAGE_SIZE = "maxMessageSize"; + field public static final java.lang.String INT_MMS_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize"; + field public static final java.lang.String INT_MMS_RECIPIENT_LIMIT = "recipientLimit"; + field public static final java.lang.String INT_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold"; + field public static final java.lang.String INT_MMS_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold"; + field public static final java.lang.String INT_MMS_SUBJECT_MAX_LENGTH = "maxSubjectLength"; field public static final java.lang.String INT_VOLTE_REPLACEMENT_RAT = "int_volte_replacement_rat"; + field public static final java.lang.String STRING_MMS_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber"; + field public static final java.lang.String STRING_MMS_HTTP_PARAMS = "httpParams"; + field public static final java.lang.String STRING_MMS_NAI_SUFFIX = "naiSuffix"; + field public static final java.lang.String STRING_MMS_UA_PROF_TAG_NAME = "uaProfTagName"; + field public static final java.lang.String STRING_MMS_UA_PROF_URL = "uaProfUrl"; + field public static final java.lang.String STRING_MMS_USER_AGENT = "userAgent"; } public final class CellIdentityCdma implements android.os.Parcelable { @@ -33196,6 +33227,7 @@ package android.telephony { field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold"; field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold"; field public static final java.lang.String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength"; + field public static final java.lang.String MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader"; field public static final java.lang.String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition"; field public static final java.lang.String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName"; field public static final java.lang.String MMS_CONFIG_UA_PROF_URL = "uaProfUrl"; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 76da13f..1d751d5 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -37,6 +37,8 @@ import android.os.ServiceManager; * @see Context#CARRIER_CONFIG_SERVICE */ public class CarrierConfigManager { + private final static String TAG = "CarrierConfigManager"; + /** * @hide */ @@ -223,7 +225,39 @@ public class CarrierConfigManager { */ public static final String STRING_VVM_TYPE = "string_vvm_type"; - private final static String TAG = "CarrierConfigManager"; + // These variables are used by the MMS service and exposed through another API, {@link + // SmsManager}. The variable names and string values are copied from there. + public static final String BOOL_MMS_ALIAS_ENABLED = "aliasEnabled"; + public static final String BOOL_MMS_ALLOW_ATTACH_AUDIO = "allowAttachAudio"; + public static final String BOOL_MMS_APPEND_TRANSACTION_ID = "enabledTransID"; + public static final String BOOL_MMS_GROUP_MMS_ENABLED = "enableGroupMms"; + public static final String BOOL_MMS_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports"; + public static final String BOOL_MMS_MMS_ENABLED = "enabledMMS"; + public static final String BOOL_MMS_MMS_READ_REPORT_ENABLED = "enableMMSReadReports"; + public static final String BOOL_MMS_MULTIPART_SMS_ENABLED = "enableMultipartSMS"; + public static final String BOOL_MMS_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC"; + public static final String BOOL_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages"; + public static final String BOOL_MMS_SHOW_CELL_BROADCAST_APP_LINKS = "config_cellBroadcastAppLinks"; + public static final String BOOL_MMS_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports"; + public static final String BOOL_MMS_SUPPORT_HTTP_CHARSET_HEADER = "supportHttpCharsetHeader"; + public static final String BOOL_MMS_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition"; + public static final String INT_MMS_ALIAS_MAX_CHARS = "aliasMaxChars"; + public static final String INT_MMS_ALIAS_MIN_CHARS = "aliasMinChars"; + public static final String INT_MMS_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout"; + public static final String INT_MMS_MAX_IMAGE_HEIGHT = "maxImageHeight"; + public static final String INT_MMS_MAX_IMAGE_WIDTH = "maxImageWidth"; + public static final String INT_MMS_MAX_MESSAGE_SIZE = "maxMessageSize"; + public static final String INT_MMS_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize"; + public static final String INT_MMS_RECIPIENT_LIMIT = "recipientLimit"; + public static final String INT_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold"; + public static final String INT_MMS_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold"; + public static final String INT_MMS_SUBJECT_MAX_LENGTH = "maxSubjectLength"; + public static final String STRING_MMS_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber"; + public static final String STRING_MMS_HTTP_PARAMS = "httpParams"; + public static final String STRING_MMS_NAI_SUFFIX = "naiSuffix"; + public static final String STRING_MMS_UA_PROF_TAG_NAME = "uaProfTagName"; + public static final String STRING_MMS_UA_PROF_URL = "uaProfUrl"; + public static final String STRING_MMS_USER_AGENT = "userAgent"; /** The default value for every variable. */ private final static PersistableBundle sDefaults; @@ -262,6 +296,39 @@ public class CarrierConfigManager { sDefaults.putInt(INT_VVM_PORT_NUMBER, 0); sDefaults.putString(STRING_VVM_DESTINATION_NUMBER, ""); sDefaults.putString(STRING_VVM_TYPE, ""); + + // MMS defaults + sDefaults.putBoolean(BOOL_MMS_ALIAS_ENABLED, false); + sDefaults.putBoolean(BOOL_MMS_ALLOW_ATTACH_AUDIO, true); + sDefaults.putBoolean(BOOL_MMS_APPEND_TRANSACTION_ID, false); + sDefaults.putBoolean(BOOL_MMS_GROUP_MMS_ENABLED, true); + sDefaults.putBoolean(BOOL_MMS_MMS_DELIVERY_REPORT_ENABLED, false); + sDefaults.putBoolean(BOOL_MMS_MMS_ENABLED, true); + sDefaults.putBoolean(BOOL_MMS_MMS_READ_REPORT_ENABLED, false); + sDefaults.putBoolean(BOOL_MMS_MULTIPART_SMS_ENABLED, true); + sDefaults.putBoolean(BOOL_MMS_NOTIFY_WAP_MMSC_ENABLED, false); + sDefaults.putBoolean(BOOL_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES, false); + sDefaults.putBoolean(BOOL_MMS_SHOW_CELL_BROADCAST_APP_LINKS, true); + sDefaults.putBoolean(BOOL_MMS_SMS_DELIVERY_REPORT_ENABLED, true); + sDefaults.putBoolean(BOOL_MMS_SUPPORT_HTTP_CHARSET_HEADER, false); + sDefaults.putBoolean(BOOL_MMS_SUPPORT_MMS_CONTENT_DISPOSITION, true); + sDefaults.putInt(INT_MMS_ALIAS_MAX_CHARS, 48); + sDefaults.putInt(INT_MMS_ALIAS_MIN_CHARS, 2); + sDefaults.putInt(INT_MMS_HTTP_SOCKET_TIMEOUT, 60 * 1000); + sDefaults.putInt(INT_MMS_MAX_IMAGE_HEIGHT, 480); + sDefaults.putInt(INT_MMS_MAX_IMAGE_WIDTH, 640); + sDefaults.putInt(INT_MMS_MAX_MESSAGE_SIZE, 300 * 1024); + sDefaults.putInt(INT_MMS_MESSAGE_TEXT_MAX_SIZE, -1); + sDefaults.putInt(INT_MMS_RECIPIENT_LIMIT, Integer.MAX_VALUE); + sDefaults.putInt(INT_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD, -1); + sDefaults.putInt(INT_MMS_SMS_TO_MMS_TEXT_THRESHOLD, -1); + sDefaults.putInt(INT_MMS_SUBJECT_MAX_LENGTH, 40); + sDefaults.putString(STRING_MMS_EMAIL_GATEWAY_NUMBER, ""); + sDefaults.putString(STRING_MMS_HTTP_PARAMS, ""); + sDefaults.putString(STRING_MMS_NAI_SUFFIX, ""); + sDefaults.putString(STRING_MMS_UA_PROF_TAG_NAME, "x-wap-profile"); + sDefaults.putString(STRING_MMS_UA_PROF_URL, ""); + sDefaults.putString(STRING_MMS_USER_AGENT, ""); } /** |