+ * The {@link #EXTRA_RINGING_CALL_STATE} extra indicates the ringing call state. + * The {@link #EXTRA_FOREGROUND_CALL_STATE} extra indicates the foreground call state. + * The {@link #EXTRA_BACKGROUND_CALL_STATE} extra indicates the background call state. + * The {@link #EXTRA_DISCONNECT_CAUSE} extra indicates the disconnect cause. + * The {@link #EXTRA_PRECISE_DISCONNECT_CAUSE} extra indicates the precise disconnect cause. + * + *
+ * Requires the READ_PRECISE_PHONE_STATE permission. + * + * @see #EXTRA_RINGING_CALL_STATE + * @see #EXTRA_FOREGROUND_CALL_STATE + * @see #EXTRA_BACKGROUND_CALL_STATE + * @see #EXTRA_DISCONNECT_CAUSE + * @see #EXTRA_PRECISE_DISCONNECT_CAUSE + * + *
+ * Requires the READ_PRECISE_PHONE_STATE permission. + * + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_PRECISE_CALL_STATE_CHANGED = + "android.intent.action.PRECISE_CALL_STATE"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast + * for an integer containing the state of the current ringing call. + * + * @see PreciseCallState#PRECISE_CALL_STATE_NOT_VALID + * @see PreciseCallState#PRECISE_CALL_STATE_IDLE + * @see PreciseCallState#PRECISE_CALL_STATE_ACTIVE + * @see PreciseCallState#PRECISE_CALL_STATE_HOLDING + * @see PreciseCallState#PRECISE_CALL_STATE_DIALING + * @see PreciseCallState#PRECISE_CALL_STATE_ALERTING + * @see PreciseCallState#PRECISE_CALL_STATE_INCOMING + * @see PreciseCallState#PRECISE_CALL_STATE_WAITING + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_RINGING_CALL_STATE = "ringing_state"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast + * for an integer containing the state of the current foreground call. + * + * @see PreciseCallState#PRECISE_CALL_STATE_NOT_VALID + * @see PreciseCallState#PRECISE_CALL_STATE_IDLE + * @see PreciseCallState#PRECISE_CALL_STATE_ACTIVE + * @see PreciseCallState#PRECISE_CALL_STATE_HOLDING + * @see PreciseCallState#PRECISE_CALL_STATE_DIALING + * @see PreciseCallState#PRECISE_CALL_STATE_ALERTING + * @see PreciseCallState#PRECISE_CALL_STATE_INCOMING + * @see PreciseCallState#PRECISE_CALL_STATE_WAITING + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_FOREGROUND_CALL_STATE = "foreground_state"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast + * for an integer containing the state of the current background call. + * + * @see PreciseCallState#PRECISE_CALL_STATE_NOT_VALID + * @see PreciseCallState#PRECISE_CALL_STATE_IDLE + * @see PreciseCallState#PRECISE_CALL_STATE_ACTIVE + * @see PreciseCallState#PRECISE_CALL_STATE_HOLDING + * @see PreciseCallState#PRECISE_CALL_STATE_DIALING + * @see PreciseCallState#PRECISE_CALL_STATE_ALERTING + * @see PreciseCallState#PRECISE_CALL_STATE_INCOMING + * @see PreciseCallState#PRECISE_CALL_STATE_WAITING + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED + * @see PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_BACKGROUND_CALL_STATE = "background_state"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast + * for an integer containing the disconnect cause. + * + * @see DisconnectCause + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_DISCONNECT_CAUSE = "disconnect_cause"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast + * for an integer containing the disconnect cause provided by the RIL. + * + * @see PreciseDisconnectCause + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_PRECISE_DISCONNECT_CAUSE = "precise_disconnect_cause"; + + /** + * Broadcast intent action indicating a data connection has changed, + * providing precise information about the connection. + * + *
+ * The {@link #EXTRA_DATA_STATE} extra indicates the connection state. + * The {@link #EXTRA_DATA_NETWORK_TYPE} extra indicates the connection network type. + * The {@link #EXTRA_DATA_APN_TYPE} extra indicates the APN type. + * The {@link #EXTRA_DATA_APN} extra indicates the APN. + * The {@link #EXTRA_DATA_CHANGE_REASON} extra indicates the connection change reason. + * The {@link #EXTRA_DATA_IFACE_PROPERTIES} extra indicates the connection interface. + * The {@link #EXTRA_DATA_FAILURE_CAUSE} extra indicates the connection fail cause. + * + *
+ * Requires the READ_PRECISE_PHONE_STATE permission. + * + * @see #EXTRA_DATA_STATE + * @see #EXTRA_DATA_NETWORK_TYPE + * @see #EXTRA_DATA_APN_TYPE + * @see #EXTRA_DATA_APN + * @see #EXTRA_DATA_CHANGE_REASON + * @see #EXTRA_DATA_IFACE + * @see #EXTRA_DATA_FAILURE_CAUSE + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED = + "android.intent.action.PRECISE_DATA_CONNECTION_STATE_CHANGED"; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an integer containing the state of the current data connection. + * + * @see TelephonyManager#DATA_UNKNOWN + * @see TelephonyManager#DATA_DISCONNECTED + * @see TelephonyManager#DATA_CONNECTING + * @see TelephonyManager#DATA_CONNECTED + * @see TelephonyManager#DATA_SUSPENDED + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_DATA_STATE = PhoneConstants.STATE_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an integer containing the network type. + * + * @see TelephonyManager#NETWORK_TYPE_UNKNOWN + * @see TelephonyManager#NETWORK_TYPE_GPRS + * @see TelephonyManager#NETWORK_TYPE_EDGE + * @see TelephonyManager#NETWORK_TYPE_UMTS + * @see TelephonyManager#NETWORK_TYPE_CDMA + * @see TelephonyManager#NETWORK_TYPE_EVDO_0 + * @see TelephonyManager#NETWORK_TYPE_EVDO_A + * @see TelephonyManager#NETWORK_TYPE_1xRTT + * @see TelephonyManager#NETWORK_TYPE_HSDPA + * @see TelephonyManager#NETWORK_TYPE_HSUPA + * @see TelephonyManager#NETWORK_TYPE_HSPA + * @see TelephonyManager#NETWORK_TYPE_IDEN + * @see TelephonyManager#NETWORK_TYPE_EVDO_B + * @see TelephonyManager#NETWORK_TYPE_LTE + * @see TelephonyManager#NETWORK_TYPE_EHRPD + * @see TelephonyManager#NETWORK_TYPE_HSPAP + * + *
+ * Retrieve with + * {@link android.content.Intent#getIntExtra(String name, int defaultValue)}. + * + * @hide + */ + public static final String EXTRA_DATA_NETWORK_TYPE = PhoneConstants.DATA_NETWORK_TYPE_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an String containing the data APN type. + * + *
+ * Retrieve with + * {@link android.content.Intent#getStringExtra(String name)}. + * + * @hide + */ + public static final String EXTRA_DATA_APN_TYPE = PhoneConstants.DATA_APN_TYPE_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an String containing the data APN. + * + *
+ * Retrieve with + * {@link android.content.Intent#getStringExtra(String name)}. + * + * @hide + */ + public static final String EXTRA_DATA_APN = PhoneConstants.DATA_APN_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an String representation of the change reason. + * + *
+ * Retrieve with + * {@link android.content.Intent#getStringExtra(String name)}. + * + * @hide + */ + public static final String EXTRA_DATA_CHANGE_REASON = PhoneConstants.STATE_CHANGE_REASON_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for an String representation of the data interface. + * + *
+ * Retrieve with + * {@link android.content.Intent#getParcelableExtra(String name)}. + * + * @hide + */ + public static final String EXTRA_DATA_LINK_PROPERTIES_KEY = PhoneConstants.DATA_LINK_PROPERTIES_KEY; + + /** + * The lookup key used with the {@link #ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED} broadcast + * for the data connection fail cause. + * + *
+ * Retrieve with
+ * {@link android.content.Intent#getStringExtra(String name)}.
+ *
+ * @hide
+ */
+ public static final String EXTRA_DATA_FAILURE_CAUSE = PhoneConstants.DATA_FAILURE_CAUSE_KEY;
//
//
diff --git a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
index 3a04ceb9e65bb..f228d4e4fa359 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -20,6 +20,8 @@ import android.os.Bundle;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.CellInfo;
+import android.telephony.PreciseCallState;
+import android.telephony.PreciseDataConnectionState;
oneway interface IPhoneStateListener {
void onServiceStateChanged(in ServiceState serviceState);
@@ -35,5 +37,7 @@ oneway interface IPhoneStateListener {
void onSignalStrengthsChanged(in SignalStrength signalStrength);
void onOtaspChanged(in int otaspMode);
void onCellInfoChanged(in List