diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-11 03:47:09 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-11 16:58:39 -0800 |
commit | 0e1dbed9194839a90755670d8fdf9046a75b85f7 (patch) | |
tree | 010372762ddc617295da2862f7d61813da9e3586 /telephony | |
parent | 564f10b8f05ddf4d9ea2c0e64f1b113fe6dad4b8 (diff) | |
parent | e342181a4a8d8177b3b87ffe141777565fe98f15 (diff) | |
download | frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.zip frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.gz frameworks_base-0e1dbed9194839a90755670d8fdf9046a75b85f7.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/base into cm-13.0
Android 6.0.1 release 22
Change-Id: I0d31899b234156a91accb61e0a7fb3d8d16d5062
Diffstat (limited to 'telephony')
4 files changed, 116 insertions, 22 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 29e54a3..e1deb98 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -428,6 +428,15 @@ public class CarrierConfigManager { public static final String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL = "hide_preferred_network_type_bool"; /** + * Determine whether user can switch Wi-Fi preferred or Cellular preferred in calling preference. + * Some operators support Wi-Fi Calling only, not VoLTE. + * They don't need "Cellular preferred" option. + * In this case, set uneditalbe attribute for preferred preference. + * @hide + */ + public static final String KEY_EDITABLE_WFC_MODE_BOOL = "editable_wfc_mode_bool"; + + /** * Specifies the amount of gap to be added in millis between postdial DTMF tones. When a * non-zero value is specified, the UE shall wait for the specified amount of time before it * sends out successive DTMF tones on the network. @@ -449,6 +458,13 @@ public class CarrierConfigManager { */ public static final String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool"; + /** + * Boolean indicating if intent for emergency call state changes should be broadcast + * @hide + */ + public static final String KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL = + "broadcast_emergency_call_state_changes_bool"; + // 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"; @@ -547,6 +563,7 @@ public class CarrierConfigManager { sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING, ""); sDefaults.putBoolean(KEY_CSP_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_ALLOW_ADDING_APNS_BOOL, true); + sDefaults.putBoolean(KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL, false); sDefaults.putBoolean(KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL, false); sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null); @@ -560,6 +577,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true); sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false); sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false); + sDefaults.putBoolean(KEY_EDITABLE_WFC_MODE_BOOL, true); sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100); // MMS defaults @@ -612,12 +630,15 @@ public class CarrierConfigManager { @Nullable public PersistableBundle getConfigForSubId(int subId) { try { - return getICarrierConfigLoader().getConfigForSubId(subId); + ICarrierConfigLoader loader = getICarrierConfigLoader(); + if (loader == null) { + Rlog.w(TAG, "Error getting config for subId " + subId + + " ICarrierConfigLoader is null"); + return null; + } + return loader.getConfigForSubId(subId); } catch (RemoteException ex) { - Rlog.e(TAG, "Error getting config for subId " + Integer.toString(subId) + ": " - + ex.toString()); - } catch (NullPointerException ex) { - Rlog.e(TAG, "Error getting config for subId " + Integer.toString(subId) + ": " + Rlog.e(TAG, "Error getting config for subId " + subId + ": " + ex.toString()); } return null; @@ -653,11 +674,15 @@ public class CarrierConfigManager { */ public void notifyConfigChangedForSubId(int subId) { try { - getICarrierConfigLoader().notifyConfigChangedForSubId(subId); + ICarrierConfigLoader loader = getICarrierConfigLoader(); + if (loader == null) { + Rlog.w(TAG, "Error reloading config for subId=" + subId + + " ICarrierConfigLoader is null"); + return; + } + loader.notifyConfigChangedForSubId(subId); } catch (RemoteException ex) { Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex.toString()); - } catch (NullPointerException ex) { - Rlog.e(TAG, "Error reloading config for subId=" + subId + ": " + ex.toString()); } } @@ -673,11 +698,15 @@ public class CarrierConfigManager { @SystemApi public void updateConfigForPhoneId(int phoneId, String simState) { try { - getICarrierConfigLoader().updateConfigForPhoneId(phoneId, simState); + ICarrierConfigLoader loader = getICarrierConfigLoader(); + if (loader == null) { + Rlog.w(TAG, "Error updating config for phoneId=" + phoneId + + " ICarrierConfigLoader is null"); + return; + } + loader.updateConfigForPhoneId(phoneId, simState); } catch (RemoteException ex) { Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString()); - } catch (NullPointerException ex) { - Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex.toString()); } } @@ -693,6 +722,7 @@ public class CarrierConfigManager { } /** @hide */ + @Nullable private ICarrierConfigLoader getICarrierConfigLoader() { return ICarrierConfigLoader.Stub .asInterface(ServiceManager.getService(Context.CARRIER_CONFIG_SERVICE)); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 12c039e..7afaf7e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -609,6 +609,46 @@ public class TelephonyManager { public static final String EXTRA_DATA_FAILURE_CAUSE = PhoneConstants.DATA_FAILURE_CAUSE_KEY; /** + * Broadcast intent action for letting custom component know to show voicemail notification. + * @hide + */ + @SystemApi + public static final String ACTION_SHOW_VOICEMAIL_NOTIFICATION = + "android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION"; + + /** + * The number of voice messages associated with the notification. + * @hide + */ + @SystemApi + public static final String EXTRA_NOTIFICATION_COUNT = + "android.telephony.extra.NOTIFICATION_COUNT"; + + /** + * The voicemail number. + * @hide + */ + @SystemApi + public static final String EXTRA_VOICEMAIL_NUMBER = + "android.telephony.extra.VOICEMAIL_NUMBER"; + + /** + * The intent to call voicemail. + * @hide + */ + @SystemApi + public static final String EXTRA_CALL_VOICEMAIL_INTENT = + "android.telephony.extra.CALL_VOICEMAIL_INTENT"; + + /** + * The intent to launch voicemail settings. + * @hide + */ + @SystemApi + public static final String EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT = + "android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT"; + + /** * Response codes for sim activation. Activation completed successfully. * @hide */ diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index 5fd7d5e..e612be3 100755 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -35,17 +35,17 @@ public class PhoneConstants { IDLE, RINGING, OFFHOOK; }; - /** - * The state of a data connection. - * <ul> - * <li>CONNECTED = IP traffic should be available</li> - * <li>CONNECTING = Currently setting up data connection</li> - * <li>DISCONNECTED = IP not available</li> - * <li>SUSPENDED = connection is created but IP traffic is - * temperately not available. i.e. voice call is in place - * in 2G network</li> - * </ul> - */ + /** + * The state of a data connection. + * <ul> + * <li>CONNECTED = IP traffic should be available</li> + * <li>CONNECTING = Currently setting up data connection</li> + * <li>DISCONNECTED = IP not available</li> + * <li>SUSPENDED = connection is created but IP traffic is + * temperately not available. i.e. voice call is in place + * in 2G network</li> + * </ul> + */ public enum DataState { CONNECTED, CONNECTING, DISCONNECTED, SUSPENDED; }; @@ -86,6 +86,7 @@ public class PhoneConstants { public static final String NETWORK_UNAVAILABLE_KEY = "networkUnvailable"; public static final String DATA_NETWORK_ROAMING_KEY = "networkRoaming"; public static final String PHONE_IN_ECM_STATE = "phoneinECMState"; + public static final String PHONE_IN_EMERGENCY_CALL = "phoneInEmergencyCall"; public static final String REASON_LINK_PROPERTIES_CHANGED = "linkPropertiesChanged"; diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index f563839..77b8a67 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -75,6 +75,7 @@ public class TelephonyIntents { */ public static final String ACTION_RADIO_TECHNOLOGY_CHANGED = "android.intent.action.RADIO_TECHNOLOGY"; + /** * <p>Broadcast Action: The emergency callback mode is changed. * <ul> @@ -94,6 +95,28 @@ public class TelephonyIntents { */ public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED"; + + /** + * <p>Broadcast Action: The emergency call state is changed. + * <ul> + * <li><em>phoneInEmergencyCall</em> - A boolean value, true if phone in emergency call, + * false otherwise</li> + * </ul> + * <p class="note"> + * You can <em>not</em> receive this through components declared + * in manifests, only by explicitly registering for it with + * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, + * android.content.IntentFilter) Context.registerReceiver()}. + * + * <p class="note"> + * Requires no permission. + * + * <p class="note">This is a protected intent that can only be sent + * by the system. + */ + public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED + = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED"; + /** * Broadcast Action: The phone's signal strength has changed. The intent will have the * following extra values:</p> |