diff options
author | Xiangyu/Malcolm Chen <refuhoo@google.com> | 2020-01-13 21:56:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-01-13 21:56:31 +0000 |
commit | 34fb1da756e1feabd8fe041b7464c63b82311eb7 (patch) | |
tree | 8baed32d8fa3520af64350b72d31d3d182af9937 /telephony/java | |
parent | d71294243cd48969cce1b8650e49ed2af911fe45 (diff) | |
parent | 93fcf24a237842f87a9bd86664cb8d188b1d069c (diff) |
Merge "Move ACTION_CARRIER_* intent and extras from TelephonyIntents to TelephonyManager."
Diffstat (limited to 'telephony/java')
3 files changed, 189 insertions, 81 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 86685363deb2..c641c9cc9096 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1630,8 +1630,8 @@ public class CarrierConfigManager { * Defines carrier-specific actions which act upon * com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED * and configured signal args: - * {@link com.android.internal.telephony.TelephonyIntents#EXTRA_APN_TYPE_KEY apnType}, - * {@link com.android.internal.telephony.TelephonyIntents#EXTRA_ERROR_CODE_KEY errorCode} + * {@link TelephonyManager#EXTRA_APN_TYPE apnType}, + * {@link TelephonyManager#EXTRA_ERROR_CODE errorCode} * used for customization of the default carrier app * Format: * { diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 157d92db8caa..132da3d83f68 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1464,6 +1464,193 @@ public class TelephonyManager { = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED"; /** + * <p>Broadcast Action: when data connections get redirected with validation failure. + * intended for sim/account status checks and only sent to the specified carrier app + * The intent will have the following extra values:</p> + * <ul> + * <li>{@link #EXTRA_APN_TYPE}</li><dd>A string with the apn type.</dd> + * <li>{@link #EXTRA_APN_TYPE_INT}</li><dd>A integer with the apn type.</dd> + * <li>{@link #EXTRA_REDIRECTION_URL}</li><dd>redirection url string</dd> + * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> + * </ul> + * <p class="note">This is a protected intent that can only be sent by the system.</p> + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String ACTION_CARRIER_SIGNAL_REDIRECTED = + "com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED"; + + /** + * <p>Broadcast Action: when data connections setup fails. + * intended for sim/account status checks and only sent to the specified carrier app + * The intent will have the following extra values:</p> + * <ul> + * <li>{@link #EXTRA_APN_TYPE}</li><dd>A string with the apn type.</dd> + * <li>{@link #EXTRA_APN_TYPE_INT}</li><dd>A integer with the apn type.</dd> + * <li>{@link #EXTRA_ERROR_CODE}</li><dd>A integer with dataFailCause.</dd> + * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> + * </ul> + * <p class="note">This is a protected intent that can only be sent by the system. </p> + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED = + "com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED"; + + /** + * <p>Broadcast Action: when pco value is available. + * intended for sim/account status checks and only sent to the specified carrier app + * The intent will have the following extra values:</p> + * <ul> + * <li>{@link #EXTRA_APN_TYPE}</li><dd>A string with the apn type.</dd> + * <li>{@link #EXTRA_APN_TYPE_INT}</li><dd>A integer with the apn type.</dd> + * <li>{@link #EXTRA_APN_PROTOCOL}</li><dd>A string with the protocol of the apn connection + * (IP,IPV6, IPV4V6)</dd> + * <li>{@link #EXTRA_APN_PROTOCOL_INT}</li><dd>A integer with the protocol of the apn + * connection (IP,IPV6, IPV4V6)</dd> + * <li>{@link #EXTRA_PCO_ID}</li><dd>An integer indicating the pco id for the data.</dd> + * <li>{@link #EXTRA_PCO_VALUE}</li><dd>A byte array of pco data read from modem.</dd> + * <li>subId</li><dd>Sub Id which associated the data connection.</dd> + * </ul> + * <p class="note">This is a protected intent that can only be sent by the system. </p> + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String ACTION_CARRIER_SIGNAL_PCO_VALUE = + "com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE"; + + /** + * <p>Broadcast Action: when system default network available/unavailable with + * carrier-disabled mobile data. Intended for carrier apps to set/reset carrier actions when + * other network becomes system default network, Wi-Fi for example. + * The intent will have the following extra values:</p> + * <ul> + * <li>{@link #EXTRA_DEFAULT_NETWORK_AVAILABLE}</li> + * <dd>A boolean indicates default network available.</dd> + * <li>subId</li><dd>Sub Id which associated the default data.</dd> + * </ul> + * <p class="note">This is a protected intent that can only be sent by the system. </p> + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE = + "com.android.internal.telephony.CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE"; + + /** + * <p>Broadcast Action: when framework reset all carrier actions on sim load or absent. + * intended for carrier apps clean up (clear UI e.g.) and only sent to the specified carrier app + * The intent will have the following extra values:</p> + * <ul> + * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> + * </ul> + * <p class="note">This is a protected intent that can only be sent by the system.</p> + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String ACTION_CARRIER_SIGNAL_RESET = + "com.android.internal.telephony.CARRIER_SIGNAL_RESET"; + + // CARRIER_SIGNAL_ACTION extra keys + /** + * An string extra of redirected url upon {@link #ACTION_CARRIER_SIGNAL_REDIRECTED}. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_REDIRECTION_URL = "redirectionUrl"; + + /** + * An integer extra of error code upon {@link #ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED}. + * Check {@link DataFailCause} for all possible values. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_ERROR_CODE = "errorCode"; + + /** + * An string extra of corresponding apn type upon + * {@link #ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED}, + * {@link #ACTION_CARRIER_SIGNAL_REDIRECTED} and + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * @deprecated This is kept for backward compatibility reason. Use {@link #EXTRA_APN_TYPE_INT} + * instead. + * + * @hide + */ + @SystemApi + @Deprecated + @SuppressLint("ActionValue") + public static final String EXTRA_APN_TYPE = "apnType"; + + /** + * An string integer of corresponding apn type upon + * {@link #ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED}, + * {@link #ACTION_CARRIER_SIGNAL_REDIRECTED} and + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * Check {@link ApnSetting} TYPE_* for its values. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_APN_TYPE_INT = "apnTypeInt"; + + /** + * An string extra with the protocol of the apn connection (IP,IPV6, IPV4V6) upon + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * @deprecated This is kept for backward compatibility reason. + * Use {@link #EXTRA_APN_PROTOCOL_INT} instead. + * + * @hide + */ + @SystemApi + @Deprecated + @SuppressLint("ActionValue") + public static final String EXTRA_APN_PROTOCOL = "apnProto"; + + /** + * An integer extra with the protocol of the apn connection (IP,IPV6, IPV4V6) upon + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * Check {@link ApnSetting} PROTOCOL_* for its values. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_APN_PROTOCOL_INT = "apnProtoInt"; + + /** + * An integer extra indicating the pco id for the data upon + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_PCO_ID = "pcoId"; + + /** + * An extra of byte array of pco data read from modem upon + * {@link #ACTION_CARRIER_SIGNAL_PCO_VALUE} broadcasts. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_PCO_VALUE = "pcoValue"; + + /** + * An boolean extra indicating default network available upon + * {@link #ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE} broadcasts. + * @hide + */ + @SystemApi + @SuppressLint("ActionValue") + public static final String EXTRA_DEFAULT_NETWORK_AVAILABLE = "defaultNetworkAvailable"; + + /** * <p>Broadcast Action: The emergency call state is changed. * <ul> * <li><em>phoneInEmergencyCall</em> - A boolean value, true if phone in emergency call, diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index 1fbe8cb49836..a15f73cf348d 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -328,85 +328,6 @@ public class TelephonyIntents { "android.intent.action.ACTION_SET_RADIO_CAPABILITY_FAILED"; /** - * <p>Broadcast Action: when data connections get redirected with validation failure. - * intended for sim/account status checks and only sent to the specified carrier app - * The intent will have the following extra values:</p> - * <ul> - * <li>apnType</li><dd>A string with the apn type.</dd> - * <li>redirectionUrl</li><dd>redirection url string</dd> - * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> - * </ul> - * <p class="note">This is a protected intent that can only be sent by the system.</p> - */ - public static final String ACTION_CARRIER_SIGNAL_REDIRECTED = - "com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED"; - /** - * <p>Broadcast Action: when data connections setup fails. - * intended for sim/account status checks and only sent to the specified carrier app - * The intent will have the following extra values:</p> - * <ul> - * <li>apnType</li><dd>A string with the apn type.</dd> - * <li>errorCode</li><dd>A integer with dataFailCause.</dd> - * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> - * </ul> - * <p class="note">This is a protected intent that can only be sent by the system. </p> - */ - public static final String ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED = - "com.android.internal.telephony.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED"; - - /** - * <p>Broadcast Action: when pco value is available. - * intended for sim/account status checks and only sent to the specified carrier app - * The intent will have the following extra values:</p> - * <ul> - * <li>apnType</li><dd>A string with the apn type.</dd> - * <li>apnProto</li><dd>A string with the protocol of the apn connection (IP,IPV6, - * IPV4V6)</dd> - * <li>pcoId</li><dd>An integer indicating the pco id for the data.</dd> - * <li>pcoValue</li><dd>A byte array of pco data read from modem.</dd> - * <li>subId</li><dd>Sub Id which associated the data connection.</dd> - * </ul> - * <p class="note">This is a protected intent that can only be sent by the system. </p> - */ - public static final String ACTION_CARRIER_SIGNAL_PCO_VALUE = - "com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE"; - - /** - * <p>Broadcast Action: when system default network available/unavailable with - * carrier-disabled mobile data. Intended for carrier apps to set/reset carrier actions when - * other network becomes system default network, Wi-Fi for example. - * The intent will have the following extra values:</p> - * <ul> - * <li>defaultNetworkAvailable</li><dd>A boolean indicates default network available.</dd> - * <li>subId</li><dd>Sub Id which associated the default data.</dd> - * </ul> - * <p class="note">This is a protected intent that can only be sent by the system. </p> - */ - public static final String ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE = - "com.android.internal.telephony.CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE"; - - /** - * <p>Broadcast Action: when framework reset all carrier actions on sim load or absent. - * intended for carrier apps clean up (clear UI e.g.) and only sent to the specified carrier app - * The intent will have the following extra values:</p> - * <ul> - * <li>subId</li><dd>Sub Id which associated the data connection failure.</dd> - * </ul> - * <p class="note">This is a protected intent that can only be sent by the system.</p> - */ - public static final String ACTION_CARRIER_SIGNAL_RESET = - "com.android.internal.telephony.CARRIER_SIGNAL_RESET"; - - // CARRIER_SIGNAL_ACTION extra keys - public static final String EXTRA_REDIRECTION_URL_KEY = "redirectionUrl"; - public static final String EXTRA_ERROR_CODE_KEY = "errorCode"; - public static final String EXTRA_APN_TYPE_KEY = "apnType"; - public static final String EXTRA_APN_PROTO_KEY = "apnProto"; - public static final String EXTRA_PCO_ID_KEY = "pcoId"; - public static final String EXTRA_PCO_VALUE_KEY = "pcoValue"; - public static final String EXTRA_DEFAULT_NETWORK_AVAILABLE_KEY = "defaultNetworkAvailable"; - - /** * Broadcast action to trigger CI OMA-DM Session. */ public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE = |