diff options
Diffstat (limited to 'telephony/java')
11 files changed, 497 insertions, 132 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index b3beaf9..b74b52d 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 */ @@ -49,6 +51,10 @@ public class CarrierConfigManager { public static final String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; + // Below are the keys used in carrier config bundles. To add a new variable, define the key and + // give it a default value in sDefaults. If you need to ship a per-network override in the + // system image, that can be added in packages/apps/CarrierConfig. + /** * Flag indicating whether the Phone app should ignore EVENT_SIM_NETWORK_LOCKED * events from the Sim. @@ -56,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 @@ -66,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. @@ -78,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. @@ -115,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. @@ -145,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 @@ -197,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. */ @@ -206,70 +212,136 @@ 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 below). + * The type of visual voicemail protocol the carrier adheres to. See {@link TelephonyManager} + * for possible values. For example {@link TelephonyManager#VVM_TYPE_OMTP}. * * @hide */ - public static final String STRING_VVM_TYPE = "string_vvm_type"; - - /* Visual voicemail protocols */ + public static final String KEY_VVM_TYPE_STRING = "vvm_type_string"; /** - * The OMTP protocol. + * 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 VVM_TYPE_OMTP = "vvm_type_omtp"; - - private final static String TAG = "CarrierConfigManager"; + 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 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(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, ""); } /** @@ -308,18 +380,19 @@ public class CarrierConfigManager { /** * Calling this method triggers telephony services to fetch the current carrier configuration. * <p> - * Normally this does not need to be called because the platform reloads config on its own. Call - * this method if your app wants to update config at an arbitrary moment. + * Normally this does not need to be called because the platform reloads config on its own. + * This should be called by a carrier service app if it wants to update config at an arbitrary + * moment. * </p> * <p> * This method returns before the reload has completed, and - * {@link android.service.carrier.CarrierConfigService#onLoadConfig} will be called from an + * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an * arbitrary thread. * </p> */ - public void reloadCarrierConfigForSubId(int subId) { + public void notifyConfigChangedForSubId(int subId) { try { - getICarrierConfigLoader().reloadCarrierConfigForSubId(subId); + getICarrierConfigLoader().notifyConfigChangedForSubId(subId); } catch (RemoteException ex) { Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex.toString()); } catch (NullPointerException ex) { @@ -333,7 +406,7 @@ public class CarrierConfigManager { * Depending on simState, the config may be cleared or loaded from config app. This is only used * by SubscriptionInfoUpdater. * </p> - * + * * @hide */ @SystemApi diff --git a/telephony/java/android/telephony/ModemActivityInfo.aidl b/telephony/java/android/telephony/ModemActivityInfo.aidl new file mode 100644 index 0000000..b85ef7a --- /dev/null +++ b/telephony/java/android/telephony/ModemActivityInfo.aidl @@ -0,0 +1,20 @@ +/* +** +** Copyright 2015, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.telephony; + +parcelable ModemActivityInfo; diff --git a/telephony/java/android/telephony/ModemActivityInfo.java b/telephony/java/android/telephony/ModemActivityInfo.java new file mode 100644 index 0000000..ea96e7c --- /dev/null +++ b/telephony/java/android/telephony/ModemActivityInfo.java @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.telephony; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.Arrays; + +/** + * Reports modem activity information + * @hide + */ +public class ModemActivityInfo implements Parcelable { + /** + * Tx power index + * index 0 = tx_power < 0dBm + * index 1 = 0dBm < tx_power < 5dBm + * index 2 = 5dBm < tx_power < 15dBm + * index 3 = 15dBm < tx_power < 20dBm + * index 4 = tx_power > 20dBm + */ + public static final int TX_POWER_LEVELS = 5; + + private final long mTimestamp; + private final int mSleepTimeMs; + private final int mIdleTimeMs; + private final int [] mTxTimeMs = new int[TX_POWER_LEVELS]; + private final int mRxTimeMs; + private final int mEnergyUsed; + + public ModemActivityInfo(long timestamp, int sleepTimeMs, int idleTimeMs, + int[] txTimeMs, int rxTimeMs, int energyUsed) { + mTimestamp = timestamp; + mSleepTimeMs = sleepTimeMs; + mIdleTimeMs = idleTimeMs; + System.arraycopy(txTimeMs, 0, mTxTimeMs, 0, Math.min(txTimeMs.length, TX_POWER_LEVELS)); + mRxTimeMs = rxTimeMs; + mEnergyUsed = energyUsed; + } + + @Override + public String toString() { + return "ModemActivityInfo{" + + " mTimestamp=" + mTimestamp + + " mSleepTimeMs=" + mSleepTimeMs + + " mTxTimeMs[]=" + Arrays.toString(mTxTimeMs) + + " mRxTimeMs=" + mRxTimeMs + + " mEnergyUsed=" + mEnergyUsed + + "}"; + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<ModemActivityInfo> CREATOR = + new Parcelable.Creator<ModemActivityInfo>() { + public ModemActivityInfo createFromParcel(Parcel in) { + long timestamp = in.readLong(); + int sleepTimeMs = in.readInt(); + int idleTimeMs = in.readInt(); + int[] txTimeMs = new int[TX_POWER_LEVELS]; + for (int i = 0; i < TX_POWER_LEVELS; i++) { + txTimeMs[i] = in.readInt(); + } + int rxTimeMs = in.readInt(); + int energyUsed = in.readInt(); + return new ModemActivityInfo(timestamp, sleepTimeMs, idleTimeMs, + txTimeMs, rxTimeMs, energyUsed); + } + + public ModemActivityInfo[] newArray(int size) { + return new ModemActivityInfo[size]; + } + }; + + public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(mTimestamp); + dest.writeInt(mSleepTimeMs); + dest.writeInt(mIdleTimeMs); + for (int i = 0; i < TX_POWER_LEVELS; i++) { + dest.writeInt(mTxTimeMs[i]); + } + dest.writeInt(mRxTimeMs); + dest.writeInt(mEnergyUsed); + } + + /** + * @return timestamp of record creation + */ + public long getTimestamp() { + return mTimestamp; + } + + /** + * @return tx time in ms. It's an array of tx times + * with each index... + */ + public int [] getTxTimeMillis() { + return mTxTimeMs; + } + + /** + * @return sleep time in ms. + */ + public int getSleepTimeMillis() { + return mSleepTimeMs; + } + + /** + * @return idle time in ms. + */ + public int getIdleTimeMillis() { + return mIdleTimeMs; + } + + /** + * @return rx time in ms. + */ + public int getRxTimeMillis() { + return mRxTimeMs; + } + + /** + * product of current(mA), voltage(V) and time(ms) + * @return energy used + */ + public int getEnergyUsed () { + return mEnergyUsed; + } + + /** + * @return if the record is valid + */ + public boolean isValid() { + int totalTxTimeMs = 0; + int txTime [] = getTxTimeMillis(); + for (int i = 0; i < TX_POWER_LEVELS; i++) { + totalTxTimeMs += txTime[i]; + } + return ((getIdleTimeMillis() != 0) || (totalTxTimeMs != 0) + || (getSleepTimeMillis() != 0) || (getIdleTimeMillis() != 0)); + } +} diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index aae3ff6..3fcd7d9 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -2336,12 +2336,12 @@ public class PhoneNumberUtils * @param phoneNumber A {@code CharSequence} the entirety of which represents a phone number. * @return A {@code CharSequence} with appropriate annotations. */ - public static CharSequence getPhoneTtsSpannable(CharSequence phoneNumber) { + public static CharSequence createTtsSpannable(CharSequence phoneNumber) { if (phoneNumber == null) { return null; } Spannable spannable = Spannable.Factory.getInstance().newSpannable(phoneNumber); - PhoneNumberUtils.addPhoneTtsSpan(spannable, 0, spannable.length()); + PhoneNumberUtils.addTtsSpan(spannable, 0, spannable.length()); return spannable; } @@ -2351,12 +2351,12 @@ public class PhoneNumberUtils * * @param s A {@code Spannable} to annotate. * @param start The starting character position of the phone number in {@code s}. - * @param end The ending character position of the phone number in {@code s}. + * @param endExclusive The position after the ending character in the phone number {@code s}. */ - public static void addPhoneTtsSpan(Spannable s, int start, int end) { - s.setSpan(getPhoneTtsSpan(s.subSequence(start, end).toString()), + public static void addTtsSpan(Spannable s, int start, int endExclusive) { + s.setSpan(createTtsSpan(s.subSequence(start, endExclusive).toString()), start, - end, + endExclusive, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } @@ -2366,13 +2366,13 @@ public class PhoneNumberUtils * * @param phoneNumber A {@code CharSequence} the entirety of which represents a phone number. * @return A {@code CharSequence} with appropriate annotations. - * @deprecated Renamed {@link #getPhoneTtsSpannable}. + * @deprecated Renamed {@link #createTtsSpannable}. * * @hide */ @Deprecated public static CharSequence ttsSpanAsPhoneNumber(CharSequence phoneNumber) { - return getPhoneTtsSpannable(phoneNumber); + return createTtsSpannable(phoneNumber); } /** @@ -2383,13 +2383,13 @@ public class PhoneNumberUtils * @param start The starting character position of the phone number in {@code s}. * @param end The ending character position of the phone number in {@code s}. * - * @deprecated Renamed {@link #addPhoneTtsSpan}. + * @deprecated Renamed {@link #addTtsSpan}. * * @hide */ @Deprecated public static void ttsSpanAsPhoneNumber(Spannable s, int start, int end) { - addPhoneTtsSpan(s, start, end); + addTtsSpan(s, start, end); } /** @@ -2398,7 +2398,7 @@ public class PhoneNumberUtils * @param phoneNumberString A {@code String} the entirety of which represents a phone number. * @return A {@code TtsSpan} for {@param phoneNumberString}. */ - public static TtsSpan getPhoneTtsSpan(String phoneNumberString) { + public static TtsSpan createTtsSpan(String phoneNumberString) { if (phoneNumberString == null) { return null; } 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 d674b31..1fe0f0b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -264,12 +264,19 @@ public class TelephonyManager { /** * The emergency dialer may choose to present activities with intent filters for this * action as emergency assistance buttons that launch the activity when clicked. + * + * @hide */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_EMERGENCY_ASSISTANCE = "android.telephony.action.EMERGENCY_ASSISTANCE"; /** + * @hide + */ + public static final boolean EMERGENCY_ASSISTANCE_ENABLED = false; + + /** * The lookup key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast * for a String containing the new call state. * @@ -605,6 +612,22 @@ public class TelephonyManager { @SystemApi public static final int SIM_ACTIVATION_RESULT_CANCELED = 4; + /* Visual voicemail protocols */ + + /** + * The OMTP protocol. + * + * @hide + */ + public static final String VVM_TYPE_OMTP = "vvm_type_omtp"; + + /** + * A flavor of OMTP protocol for Comverse. + * + * @hide + */ + public static final String VVM_TYPE_CVVM = "vvm_type_cvvm"; + // // // Device Info @@ -780,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; } } @@ -1602,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); } /** @@ -1622,13 +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]); - Rlog.d(TAG, "getSimState: simState=" + simState + " slotIdx=" + slotIdx); + int simState = SubscriptionManager.getSimStateForSlotIdx(slotIdx); return simState; } @@ -1679,7 +1723,6 @@ public class TelephonyManager { } } } - Rlog.d(TAG, "getSimOperatorNumeric(): default subId=" + subId); return getSimOperatorNumericForSubscription(subId); } @@ -2277,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} @@ -2712,7 +2756,7 @@ public class TelephonyManager { * The list can include one or more of {@link android.telephony.CellInfoGsm CellInfoGsm}, * {@link android.telephony.CellInfoCdma CellInfoCdma}, * {@link android.telephony.CellInfoLte CellInfoLte} and - * {@link android.telephony.CellInfoWcdma CellInfoCdma} in any combination. + * {@link android.telephony.CellInfoWcdma CellInfoWcdma} in any combination. * Specifically on devices with multiple radios it is typical to see instances of * one or more of any these in the list. In addition 0, 1 or more CellInfo * objects may return isRegistered() true. @@ -3221,8 +3265,6 @@ public class TelephonyManager { propVal = values[phoneId]; } } - Rlog.d(TAG, "getTelephonyProperty: return propVal='" + propVal + "' phoneId=" + phoneId - + " property='" + property + "' defaultVal='" + defaultVal + "' prop=" + prop); return propVal == null ? defaultVal : propVal; } @@ -3616,11 +3658,11 @@ public class TelephonyManager { /** @hide */ @SystemApi - public int checkCarrierPrivilegesForPackage(String pkgname) { + public int checkCarrierPrivilegesForPackage(String pkgName) { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.checkCarrierPrivilegesForPackage(pkgname); + return telephony.checkCarrierPrivilegesForPackage(pkgName); } catch (RemoteException ex) { Rlog.e(TAG, "checkCarrierPrivilegesForPackage RemoteException", ex); } catch (NullPointerException ex) { @@ -3631,6 +3673,21 @@ public class TelephonyManager { /** @hide */ @SystemApi + public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) { + try { + ITelephony telephony = getITelephony(); + if (telephony != null) + return telephony.checkCarrierPrivilegesForPackageAnyPhone(pkgName); + } catch (RemoteException ex) { + Rlog.e(TAG, "checkCarrierPrivilegesForPackageAnyPhone RemoteException", ex); + } catch (NullPointerException ex) { + Rlog.e(TAG, "checkCarrierPrivilegesForPackageAnyPhone NPE", ex); + } + return CARRIER_PRIVILEGE_STATUS_NO_ACCESS; + } + + /** @hide */ + @SystemApi public List<String> getCarrierPackageNamesForIntent(Intent intent) { return getCarrierPackageNamesForIntentAndPhone(intent, getDefaultPhone()); } @@ -4564,4 +4621,33 @@ public class TelephonyManager { } catch (RemoteException e) { } } + + + /** @hide */ + public String getLocaleFromDefaultSim() { + try { + final ITelephony telephony = getITelephony(); + if (telephony != null) { + return telephony.getLocaleFromDefaultSim(); + } + } catch (RemoteException ex) { + } + return null; + } + + /** + * Returns the modem activity info. + * @hide + */ + public ModemActivityInfo getModemActivityInfo() { + try { + ITelephony service = getITelephony(); + if (service != null) { + return service.getModemActivityInfo(); + } + } catch (RemoteException e) { + Log.e(TAG, "Error calling ITelephony#getModemActivityInfo", e); + } + return null; + } } diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java index 604d32d..1c69794 100644 --- a/telephony/java/com/android/ims/ImsCallProfile.java +++ b/telephony/java/com/android/ims/ImsCallProfile.java @@ -313,28 +313,28 @@ public class ImsCallProfile implements Parcelable { * @return The video state. */ public static int getVideoStateFromImsCallProfile(ImsCallProfile callProfile) { - int videostate = VideoProfile.VideoState.AUDIO_ONLY; + int videostate = VideoProfile.STATE_AUDIO_ONLY; switch (callProfile.mCallType) { case CALL_TYPE_VT_TX: - videostate = VideoProfile.VideoState.TX_ENABLED; + videostate = VideoProfile.STATE_TX_ENABLED; break; case CALL_TYPE_VT_RX: - videostate = VideoProfile.VideoState.RX_ENABLED; + videostate = VideoProfile.STATE_RX_ENABLED; break; case CALL_TYPE_VT: - videostate = VideoProfile.VideoState.BIDIRECTIONAL; + videostate = VideoProfile.STATE_BIDIRECTIONAL; break; case CALL_TYPE_VOICE: - videostate = VideoProfile.VideoState.AUDIO_ONLY; + videostate = VideoProfile.STATE_AUDIO_ONLY; break; default: - videostate = VideoProfile.VideoState.AUDIO_ONLY; + videostate = VideoProfile.STATE_AUDIO_ONLY; break; } - if (callProfile.isVideoPaused() && videostate != VideoProfile.VideoState.AUDIO_ONLY) { - videostate |= VideoProfile.VideoState.PAUSED; + if (callProfile.isVideoPaused() && videostate != VideoProfile.STATE_AUDIO_ONLY) { + videostate |= VideoProfile.STATE_PAUSED; } else { - videostate &= ~VideoProfile.VideoState.PAUSED; + videostate &= ~VideoProfile.STATE_PAUSED; } return videostate; } @@ -347,9 +347,9 @@ public class ImsCallProfile implements Parcelable { * @return The call type. */ public static int getCallTypeFromVideoState(int videoState) { - boolean videoTx = isVideoStateSet(videoState, VideoProfile.VideoState.TX_ENABLED); - boolean videoRx = isVideoStateSet(videoState, VideoProfile.VideoState.RX_ENABLED); - boolean isPaused = isVideoStateSet(videoState, VideoProfile.VideoState.PAUSED); + boolean videoTx = isVideoStateSet(videoState, VideoProfile.STATE_TX_ENABLED); + boolean videoRx = isVideoStateSet(videoState, VideoProfile.STATE_RX_ENABLED); + boolean isPaused = isVideoStateSet(videoState, VideoProfile.STATE_PAUSED); if (isPaused) { return ImsCallProfile.CALL_TYPE_VT_NODIR; } else if (videoTx && !videoRx) { diff --git a/telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl b/telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl index cb53f51..d77b27f 100644 --- a/telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl +++ b/telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl @@ -25,7 +25,7 @@ interface ICarrierConfigLoader { PersistableBundle getConfigForSubId(int subId); - void reloadCarrierConfigForSubId(int subId); + void notifyConfigChangedForSubId(int subId); void updateConfigForPhoneId(int phoneId, String simState); } 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); } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 25fe97c..c253b4f 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -23,6 +23,7 @@ import android.telephony.CellInfo; import android.telephony.IccOpenLogicalChannelResponse; import android.telephony.NeighboringCellInfo; import android.telephony.RadioAccessFamily; +import android.telephony.ModemActivityInfo; import java.util.List; @@ -739,9 +740,14 @@ interface ITelephony { int getCarrierPrivilegeStatus(); /** - * Similar to above, but check for pkg whose name is pkgname. + * Similar to above, but check for the package whose name is pkgName. */ - int checkCarrierPrivilegesForPackage(String pkgname); + int checkCarrierPrivilegesForPackage(String pkgName); + + /** + * Similar to above, but check across all phones. + */ + int checkCarrierPrivilegesForPackageAnyPhone(String pkgName); /** * Returns list of the package names of the carrier apps that should handle the input intent @@ -945,4 +951,18 @@ interface ITelephony { int getSubIdForPhoneAccount(in PhoneAccount phoneAccount); void factoryReset(int subId); + + /** + * An estimate of the users's current locale based on the default SIM. + * + * The returned string will be a well formed BCP-47 language tag, or {@code null} + * if no locale could be derived. + */ + String getLocaleFromDefaultSim(); + + /** + * Return the modem activity info. + *@hide + */ + ModemActivityInfo getModemActivityInfo(); } diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 12541d8..8d48c86 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -323,6 +323,7 @@ cat include/telephony/ril.h | \ int RIL_REQUEST_START_LCE = 132; int RIL_REQUEST_STOP_LCE = 133; int RIL_REQUEST_PULL_LCEDATA = 134; + int RIL_REQUEST_GET_ACTIVITY_INFO = 135; int RIL_UNSOL_RESPONSE_BASE = 1000; int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000; |
