summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java263
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java22
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java45
-rwxr-xr-xtelephony/java/com/android/internal/telephony/ISub.aidl4
4 files changed, 186 insertions, 148 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index dfb02bb..ccfaca7 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -62,7 +62,7 @@ public class CarrierConfigManager {
* effectively disable the "Sim network lock" feature.
*/
public static final String
- BOOL_IGNORE_SIM_NETWORK_LOCKED_EVENTS = "bool_ignore_sim_network_locked_events";
+ KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL = "ignore_sim_network_locked_events_bool";
/**
* Flag indicating whether the Phone app should provide a "Dismiss" button on the SIM network
@@ -72,10 +72,10 @@ public class CarrierConfigManager {
* you don't know the PIN.)
*/
public static final String
- BOOL_SIM_NETWORK_UNLOCK_ALLOW_DISMISS = "bool_sim_network_unlock_allow_dismiss";
+ KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool";
/** Flag indicating if the phone is a world phone */
- public static final String BOOL_WORLD_PHONE = "bool_world_phone";
+ public static final String KEY_WORLD_PHONE_BOOL = "world_phone_bool";
/**
* If true, enable vibration (haptic feedback) for key presses in the EmergencyDialer activity.
@@ -84,30 +84,30 @@ public class CarrierConfigManager {
* from config.xml under apps/Contacts.
*/
public static final String
- BOOL_ENABLE_DIALER_KEY_VIBRATION = "bool_enable_dialer_key_vibration";
+ KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL = "key_enable_dialer_vibration_bool";
/** Flag indicating if dtmf tone type is enabled */
- public static final String BOOL_DTMF_TYPE_ENABLED = "bool_dtmf_type_enabled";
+ public static final String KEY_DTMF_TYPE_ENABLED_BOOL = "dtmf_type_enabled_bool";
/** Flag indicating if auto retry is enabled */
- public static final String BOOL_AUTO_RETRY_ENABLED = "bool_auto_retry_enabled";
+ public static final String KEY_AUTO_RETRY_ENABLED_BOOL = "auto_retry_enabled_bool";
/**
* Determine whether we want to play local DTMF tones in a call, or just let the radio/BP handle
* playing of the tones.
*/
- public static final String BOOL_ALLOW_LOCAL_DTMF_TONES = "bool_allow_local_dtmf_tones";
+ public static final String KEY_ALLOW_LOCAL_DTMF_TONES_BOOL = "allow_local_dtmf_tones_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.)
*/
- public static final String BOOL_SHOW_ONSCREEN_DIAL_BUTTON = "bool_show_onscreen_dial_button";
+ public static final String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool";
/** Determines if device implements a noise suppression device for in call audio. */
public static final String
- BOOL_HAS_IN_CALL_NOISE_SUPPRESSION = "bool_has_in_call_noise_suppression";
+ KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL = "has_in_call_noise_suppression_bool";
/**
* Determines if the current device should allow emergency numbers to be logged in the Call Log.
@@ -121,29 +121,29 @@ public class CarrierConfigManager {
* emergency numbers.
*/
public static final String
- BOOL_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG = "bool_allow_emergency_numbers_in_call_log";
+ KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
/** If true, removes the Voice Privacy option from Call Settings */
- public static final String BOOL_VOICE_PRIVACY_DISABLE = "bool_voice_privacy_disable";
+ public static final String KEY_VOICE_PRIVACY_DISABLE_BOOL = "voice_privacy_disable_bool";
/** Control whether users can reach the carrier portions of Cellular Network Settings. */
public static final String
- BOOL_HIDE_CARRIER_NETWORK_SETTINGS = "bool_hide_carrier_network_settings";
+ KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool";
/** Control whether users can edit APNs in Settings. */
- public static final String BOOL_APN_EXPAND = "bool_apn_expand";
+ public static final String KEY_APN_EXPAND_BOOL = "apn_expand_bool";
/** Control whether users can choose a network operator. */
- public static final String BOOL_OPERATOR_SELECTION_EXPAND = "bool_operator_selection_expand";
+ public static final String KEY_OPERATOR_SELECTION_EXPAND_BOOL = "operator_selection_expand_bool";
/** Used in Cellular Network Settings for preferred network type. */
- public static final String BOOL_PREFER_2G = "bool_prefer_2g";
+ public static final String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
/** Show cdma network mode choices 1x, 3G, global etc. */
- public static final String BOOL_SHOW_CDMA_CHOICES = "bool_show_cdma_choices";
+ public static final String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool";
/** CDMA activation goes through HFA */
- public static final String BOOL_USE_HFA_FOR_PROVISIONING = "bool_use_hfa_for_provisioning";
+ public static final String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
/**
* CDMA activation goes through OTASP.
@@ -151,51 +151,51 @@ public class CarrierConfigManager {
* TODO: This should be combined with config_use_hfa_for_provisioning and implemented as an enum
* (NONE, HFA, OTASP).
*/
- public static final String BOOL_USE_OTASP_FOR_PROVISIONING = "bool_use_otasp_for_provisioning";
+ public static final String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
/** Display carrier settings menu if true */
- public static final String BOOL_CARRIER_SETTINGS_ENABLE = "bool_carrier_settings_enable";
+ public static final String KEY_CARRIER_SETTINGS_ENABLE_BOOL = "carrier_settings_enable_bool";
/** Does not display additional call seting for IMS phone based on GSM Phone */
- public static final String BOOL_ADDITIONAL_CALL_SETTING = "bool_additional_call_setting";
+ public static final String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
/** Show APN Settings for some CDMA carriers */
- public static final String BOOL_SHOW_APN_SETTING_CDMA = "bool_show_apn_setting_cdma";
+ public static final String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
/** After a CDMA conference call is merged, the swap button should be displayed. */
- public static final String BOOL_SUPPORT_SWAP_AFTER_MERGE = "bool_support_swap_after_merge";
+ public static final String KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL = "support_swap_after_merge_bool";
/**
* Determine whether the voicemail notification is persistent in the notification bar. If true,
* the voicemail notifications cannot be dismissed from the notification bar.
*/
public static final String
- BOOL_VOICEMAIL_NOTIFICATION_PERSISTENT = "bool_voicemail_notification_persistent";
+ KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL = "voicemail_notification_persistent_bool";
/** For IMS video over LTE calls, determines whether video pause signalling is supported. */
public static final String
- BOOL_SUPPORT_PAUSE_IMS_VIDEO_CALLS = "bool_support_pause_ims_video_calls";
+ KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL = "support_pause_ims_video_calls_bool";
/**
* Disables dialing "*228" (OTASP provisioning) on CDMA carriers where it is not supported or is
* potentially harmful by locking the SIM to 3G.
*/
public static final String
- BOOL_DISABLE_CDMA_ACTIVATION_CODE = "bool_disable_cdma_activation_code";
+ KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
/**
* Flag specifying whether VoLTE should be available for carrier, independent of carrier
* provisioning. If false: hard disabled. If true: then depends on carrier provisioning,
* availability, etc.
*/
- public static final String BOOL_CARRIER_VOLTE_AVAILABLE = "bool_carrier_volte_available";
+ public static final String KEY_CARRIER_VOLTE_AVAILABLE_BOOL = "carrier_volte_available_bool";
/** Flag specifying whether VoLTE availability is based on provisioning. */
- public static final String BOOL_CARRIER_VOLTE_PROVISIONED = "bool_carrier_volte_provisioned";
+ public static final String KEY_CARRIER_VOLTE_PROVISIONED_BOOL = "carrier_volte_provisioned_bool";
/** Flag specifying whether VoLTE TTY is supported. */
- public static final String BOOL_CARRIER_VOLTE_TTY_SUPPORTED
- = "bool_carrier_volte_tty_supported";
+ public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL
+ = "carrier_volte_tty_supported_bool";
/**
* If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 or RIL_RADIO_TECHNOLOGY_UNKNOWN:0
@@ -203,7 +203,7 @@ public class CarrierConfigManager {
* RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means there is no replacement value and that the default
* assumption for phone type (GSM) should be used.
*/
- public static final String INT_VOLTE_REPLACEMENT_RAT = "int_volte_replacement_rat";
+ public static final String KEY_VOLTE_REPLACEMENT_RAT_INT = "volte_replacement_rat_int";
/* The following 3 fields are related to carrier visual voicemail. */
@@ -212,14 +212,14 @@ public class CarrierConfigManager {
*
* @hide
*/
- public static final String STRING_VVM_DESTINATION_NUMBER = "string_vvm_destination_number";
+ public static final String KEY_VVM_DESTINATION_NUMBER_STRING = "vvm_destination_number_string";
/**
* The port through which the MO sms messages are sent through.
*
* @hide
*/
- public static final String INT_VVM_PORT_NUMBER = "int_vvm_port_number";
+ public static final String KEY_VVM_PORT_NUMBER_INT = "vvm_port_number_int";
/**
* The type of visual voicemail protocol the carrier adheres to. See {@link TelephonyManager}
@@ -227,112 +227,121 @@ public class CarrierConfigManager {
*
* @hide
*/
- public static final String STRING_VVM_TYPE = "string_vvm_type";
+ public static final String KEY_VVM_TYPE_STRING = "vvm_type_string";
+
+ /**
+ * The package name of the carrier's visual voicemail app to ensure that dialer visual voicemail
+ * and carrier visual voicemail are not active at the same time.
+ *
+ * @hide
+ */
+ public static final String KEY_CARRIER_VVM_PACKAGE_NAME_STRING = "carrier_vvm_package_name_string";
// 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";
+ public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
+ public static final String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio";
+ public static final String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID";
+ public static final String KEY_MMS_GROUP_MMS_ENABLED_BOOL = "enableGroupMms";
+ public static final String KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL = "enableMMSDeliveryReports";
+ public static final String KEY_MMS_MMS_ENABLED_BOOL = "enabledMMS";
+ public static final String KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL = "enableMMSReadReports";
+ public static final String KEY_MMS_MULTIPART_SMS_ENABLED_BOOL = "enableMultipartSMS";
+ public static final String KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL = "enabledNotifyWapMMSC";
+ public static final String KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL = "sendMultipartSmsAsSeparateMessages";
+ public static final String KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL = "config_cellBroadcastAppLinks";
+ public static final String KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL = "enableSMSDeliveryReports";
+ public static final String KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL = "supportHttpCharsetHeader";
+ public static final String KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL = "supportMmsContentDisposition";
+ public static final String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars";
+ public static final String KEY_MMS_ALIAS_MIN_CHARS_INT = "aliasMinChars";
+ public static final String KEY_MMS_HTTP_SOCKET_TIMEOUT_INT = "httpSocketTimeout";
+ public static final String KEY_MMS_MAX_IMAGE_HEIGHT_INT = "maxImageHeight";
+ public static final String KEY_MMS_MAX_IMAGE_WIDTH_INT = "maxImageWidth";
+ public static final String KEY_MMS_MAX_MESSAGE_SIZE_INT = "maxMessageSize";
+ public static final String KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT = "maxMessageTextSize";
+ public static final String KEY_MMS_RECIPIENT_LIMIT_INT = "recipientLimit";
+ public static final String KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT = "smsToMmsTextLengthThreshold";
+ public static final String KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT = "smsToMmsTextThreshold";
+ public static final String KEY_MMS_SUBJECT_MAX_LENGTH_INT = "maxSubjectLength";
+ public static final String KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING = "emailGatewayNumber";
+ public static final String KEY_MMS_HTTP_PARAMS_STRING = "httpParams";
+ public static final String KEY_MMS_NAI_SUFFIX_STRING = "naiSuffix";
+ public static final String KEY_MMS_UA_PROF_TAG_NAME_STRING = "uaProfTagName";
+ public static final String KEY_MMS_UA_PROF_URL_STRING = "uaProfUrl";
+ public static final String KEY_MMS_USER_AGENT_STRING = "userAgent";
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
static {
sDefaults = new PersistableBundle();
- sDefaults.putBoolean(BOOL_ADDITIONAL_CALL_SETTING, true);
- sDefaults.putBoolean(BOOL_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG, false);
- sDefaults.putBoolean(BOOL_ALLOW_LOCAL_DTMF_TONES, true);
- sDefaults.putBoolean(BOOL_APN_EXPAND, true);
- sDefaults.putBoolean(BOOL_AUTO_RETRY_ENABLED, false);
- sDefaults.putBoolean(BOOL_CARRIER_SETTINGS_ENABLE, false);
- sDefaults.putBoolean(BOOL_CARRIER_VOLTE_AVAILABLE, false);
- sDefaults.putBoolean(BOOL_CARRIER_VOLTE_PROVISIONED, false);
- sDefaults.putBoolean(BOOL_CARRIER_VOLTE_TTY_SUPPORTED, true);
- sDefaults.putBoolean(BOOL_DISABLE_CDMA_ACTIVATION_CODE, false);
- sDefaults.putBoolean(BOOL_DTMF_TYPE_ENABLED, false);
- sDefaults.putBoolean(BOOL_ENABLE_DIALER_KEY_VIBRATION, true);
- sDefaults.putBoolean(BOOL_HAS_IN_CALL_NOISE_SUPPRESSION, false);
- sDefaults.putBoolean(BOOL_HIDE_CARRIER_NETWORK_SETTINGS, false);
- sDefaults.putBoolean(BOOL_IGNORE_SIM_NETWORK_LOCKED_EVENTS, false);
- sDefaults.putBoolean(BOOL_OPERATOR_SELECTION_EXPAND, true);
- sDefaults.putBoolean(BOOL_PREFER_2G, true);
- sDefaults.putBoolean(BOOL_SHOW_APN_SETTING_CDMA, false);
- sDefaults.putBoolean(BOOL_SHOW_CDMA_CHOICES, false);
- sDefaults.putBoolean(BOOL_SHOW_ONSCREEN_DIAL_BUTTON, true);
- sDefaults.putBoolean(BOOL_SIM_NETWORK_UNLOCK_ALLOW_DISMISS, true);
- sDefaults.putBoolean(BOOL_SUPPORT_PAUSE_IMS_VIDEO_CALLS, true);
- sDefaults.putBoolean(BOOL_SUPPORT_SWAP_AFTER_MERGE, true);
- sDefaults.putBoolean(BOOL_USE_HFA_FOR_PROVISIONING, false);
- sDefaults.putBoolean(BOOL_USE_OTASP_FOR_PROVISIONING, false);
- sDefaults.putBoolean(BOOL_VOICEMAIL_NOTIFICATION_PERSISTENT, false);
- sDefaults.putBoolean(BOOL_VOICE_PRIVACY_DISABLE, false);
- sDefaults.putBoolean(BOOL_WORLD_PHONE, false);
- sDefaults.putInt(INT_VOLTE_REPLACEMENT_RAT, 0);
- sDefaults.putInt(INT_VVM_PORT_NUMBER, 0);
- sDefaults.putString(STRING_VVM_DESTINATION_NUMBER, "");
- sDefaults.putString(STRING_VVM_TYPE, "");
+ sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true);
+ sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false);
+ sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true);
+ sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true);
+ sDefaults.putBoolean(KEY_AUTO_RETRY_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_CARRIER_SETTINGS_ENABLE_BOOL, false);
+ sDefaults.putBoolean(KEY_CARRIER_VOLTE_AVAILABLE_BOOL, false);
+ sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false);
+ sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true);
+ sDefaults.putBoolean(KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL, false);
+ sDefaults.putBoolean(KEY_DTMF_TYPE_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL, true);
+ sDefaults.putBoolean(KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL, false);
+ sDefaults.putBoolean(KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL, false);
+ sDefaults.putBoolean(KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL, false);
+ sDefaults.putBoolean(KEY_OPERATOR_SELECTION_EXPAND_BOOL, true);
+ 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_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, true);
+ sDefaults.putBoolean(KEY_SUPPORT_SWAP_AFTER_MERGE_BOOL, true);
+ sDefaults.putBoolean(KEY_USE_HFA_FOR_PROVISIONING_BOOL, false);
+ sDefaults.putBoolean(KEY_USE_OTASP_FOR_PROVISIONING_BOOL, false);
+ sDefaults.putBoolean(KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL, false);
+ sDefaults.putBoolean(KEY_VOICE_PRIVACY_DISABLE_BOOL, false);
+ sDefaults.putBoolean(KEY_WORLD_PHONE_BOOL, false);
+ sDefaults.putInt(KEY_VOLTE_REPLACEMENT_RAT_INT, 0);
+ sDefaults.putString(KEY_VVM_DESTINATION_NUMBER_STRING, "");
+ sDefaults.putInt(KEY_VVM_PORT_NUMBER_INT, 0);
+ sDefaults.putString(KEY_VVM_TYPE_STRING, "");
+ sDefaults.putString(KEY_CARRIER_VVM_PACKAGE_NAME_STRING, "");
// 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, "");
+ sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_APPEND_TRANSACTION_ID_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_GROUP_MMS_ENABLED_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_MMS_DELIVERY_REPORT_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_MMS_ENABLED_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_MMS_READ_REPORT_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_MULTIPART_SMS_ENABLED_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_NOTIFY_WAP_MMSC_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_SHOW_CELL_BROADCAST_APP_LINKS_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_SMS_DELIVERY_REPORT_ENABLED_BOOL, true);
+ sDefaults.putBoolean(KEY_MMS_SUPPORT_HTTP_CHARSET_HEADER_BOOL, false);
+ sDefaults.putBoolean(KEY_MMS_SUPPORT_MMS_CONTENT_DISPOSITION_BOOL, true);
+ sDefaults.putInt(KEY_MMS_ALIAS_MAX_CHARS_INT, 48);
+ sDefaults.putInt(KEY_MMS_ALIAS_MIN_CHARS_INT, 2);
+ sDefaults.putInt(KEY_MMS_HTTP_SOCKET_TIMEOUT_INT, 60 * 1000);
+ sDefaults.putInt(KEY_MMS_MAX_IMAGE_HEIGHT_INT, 480);
+ sDefaults.putInt(KEY_MMS_MAX_IMAGE_WIDTH_INT, 640);
+ sDefaults.putInt(KEY_MMS_MAX_MESSAGE_SIZE_INT, 300 * 1024);
+ sDefaults.putInt(KEY_MMS_MESSAGE_TEXT_MAX_SIZE_INT, -1);
+ sDefaults.putInt(KEY_MMS_RECIPIENT_LIMIT_INT, Integer.MAX_VALUE);
+ sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD_INT, -1);
+ sDefaults.putInt(KEY_MMS_SMS_TO_MMS_TEXT_THRESHOLD_INT, -1);
+ sDefaults.putInt(KEY_MMS_SUBJECT_MAX_LENGTH_INT, 40);
+ sDefaults.putString(KEY_MMS_EMAIL_GATEWAY_NUMBER_STRING, "");
+ sDefaults.putString(KEY_MMS_HTTP_PARAMS_STRING, "");
+ sDefaults.putString(KEY_MMS_NAI_SUFFIX_STRING, "");
+ sDefaults.putString(KEY_MMS_UA_PROF_TAG_NAME_STRING, "x-wap-profile");
+ sDefaults.putString(KEY_MMS_UA_PROF_URL_STRING, "");
+ sDefaults.putString(KEY_MMS_USER_AGENT_STRING, "");
}
/**
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 33e52bf..e085d89 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -387,7 +387,9 @@ public class SubscriptionManager {
public SubscriptionInfo getActiveSubscriptionInfo(int subId) {
if (VDBG) logd("[getActiveSubscriptionInfo]+ subId=" + subId);
if (!isValidSubscriptionId(subId)) {
- logd("[getActiveSubscriptionInfo]- invalid subId");
+ if (DBG) {
+ logd("[getActiveSubscriptionInfo]- invalid subId");
+ }
return null;
}
@@ -751,7 +753,9 @@ public class SubscriptionManager {
*/
public static int getSlotId(int subId) {
if (!isValidSubscriptionId(subId)) {
- logd("[getSlotId]- fail");
+ if (DBG) {
+ logd("[getSlotId]- fail");
+ }
}
int result = INVALID_SIM_SLOT_INDEX;
@@ -793,7 +797,9 @@ public class SubscriptionManager {
/** @hide */
public static int getPhoneId(int subId) {
if (!isValidSubscriptionId(subId)) {
- logd("[getPhoneId]- fail");
+ if (DBG) {
+ logd("[getPhoneId]- fail");
+ }
return INVALID_PHONE_INDEX;
}
@@ -1101,9 +1107,9 @@ public class SubscriptionManager {
}
/**
- * Returns a constant indicating the state of sim for the subscription.
+ * Returns a constant indicating the state of sim for the slot idx.
*
- * @param subId
+ * @param slotIdx
*
* {@See TelephonyManager#SIM_STATE_UNKNOWN}
* {@See TelephonyManager#SIM_STATE_ABSENT}
@@ -1117,16 +1123,16 @@ public class SubscriptionManager {
*
* {@hide}
*/
- public static int getSimStateForSubscriber(int subId) {
+ public static int getSimStateForSlotIdx(int slotIdx) {
int simState;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- simState = iSub.getSimStateForSubscriber(subId);
+ simState = iSub.getSimStateForSlotIdx(slotIdx);
} catch (RemoteException ex) {
simState = TelephonyManager.SIM_STATE_UNKNOWN;
}
- logd("getSimStateForSubscriber: simState=" + simState + " subId=" + subId);
+ logd("getSimStateForSubscriber: simState=" + simState + " slotIdx=" + slotIdx);
return simState;
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index f51cb65..f5a7c0f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -803,17 +803,26 @@ public class TelephonyManager {
public CellLocation getCellLocation() {
try {
ITelephony telephony = getITelephony();
- if (telephony == null)
+ if (telephony == null) {
+ Rlog.d(TAG, "getCellLocation returning null because telephony is null");
return null;
+ }
Bundle bundle = telephony.getCellLocation(mContext.getOpPackageName());
- if (bundle.isEmpty()) return null;
+ if (bundle.isEmpty()) {
+ Rlog.d(TAG, "getCellLocation returning null because bundle is empty");
+ return null;
+ }
CellLocation cl = CellLocation.newFromBundle(bundle);
- if (cl.isEmpty())
+ if (cl.isEmpty()) {
+ Rlog.d(TAG, "getCellLocation returning null because CellLocation is empty");
return null;
+ }
return cl;
} catch (RemoteException ex) {
+ Rlog.d(TAG, "getCellLocation returning null due to RemoteException " + ex);
return null;
} catch (NullPointerException ex) {
+ Rlog.d(TAG, "getCellLocation returning null due to NullPointerException " + ex);
return null;
}
}
@@ -1625,7 +1634,25 @@ public class TelephonyManager {
* @see #SIM_STATE_CARD_IO_ERROR
*/
public int getSimState() {
- return getSimState(getDefaultSim());
+ int slotIdx = getDefaultSim();
+ // slotIdx may be invalid due to sim being absent. In that case query all slots to get
+ // sim state
+ if (slotIdx < 0) {
+ // query for all slots and return absent if all sim states are absent, otherwise
+ // return unknown
+ for (int i = 0; i < getPhoneCount(); i++) {
+ int simState = getSimState(i);
+ if (simState != SIM_STATE_ABSENT) {
+ Rlog.d(TAG, "getSimState: default sim:" + slotIdx + ", sim state for " +
+ "slotIdx=" + i + " is " + simState + ", return state as unknown");
+ return SIM_STATE_UNKNOWN;
+ }
+ }
+ Rlog.d(TAG, "getSimState: default sim:" + slotIdx + ", all SIMs absent, return " +
+ "state as absent");
+ return SIM_STATE_ABSENT;
+ }
+ return getSimState(slotIdx);
}
/**
@@ -1645,12 +1672,7 @@ public class TelephonyManager {
*/
/** {@hide} */
public int getSimState(int slotIdx) {
- int[] subId = SubscriptionManager.getSubId(slotIdx);
- if (subId == null || subId.length == 0) {
- Rlog.d(TAG, "getSimState:- empty subId return SIM_STATE_ABSENT");
- return SIM_STATE_UNKNOWN;
- }
- int simState = SubscriptionManager.getSimStateForSubscriber(subId[0]);
+ int simState = SubscriptionManager.getSimStateForSlotIdx(slotIdx);
return simState;
}
@@ -2298,7 +2320,8 @@ public class TelephonyManager {
}
/**
- * Returns the voice mail count. Return 0 if unavailable.
+ * Returns the voice mail count. Return 0 if unavailable, -1 if there are unread voice messages
+ * but the count is unknown.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index 1037f2d..918a2eb 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -180,10 +180,10 @@ interface ISub {
int[] getActiveSubIdList();
/**
- * Get the SIM state for the subscriber
+ * Get the SIM state for the slot idx
* @return SIM state as the ordinal of IccCardConstants.State
*/
- int getSimStateForSubscriber(int subId);
+ int getSimStateForSlotIdx(int slotIdx);
boolean isActiveSubId(int subId);
}