diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 48e8e964f41cb..423061879a64d 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -1771,8 +1771,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } handleRemoveListLocked(); } - broadcastPreciseCallStateChanged(ringingCallState, foregroundCallState, - backgroundCallState); } public void notifyDisconnectCause(int phoneId, int subId, int disconnectCause, @@ -2347,16 +2345,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL); } - private void broadcastPreciseCallStateChanged(int ringingCallState, int foregroundCallState, - int backgroundCallState) { - Intent intent = new Intent(TelephonyManager.ACTION_PRECISE_CALL_STATE_CHANGED); - intent.putExtra(TelephonyManager.EXTRA_RINGING_CALL_STATE, ringingCallState); - intent.putExtra(TelephonyManager.EXTRA_FOREGROUND_CALL_STATE, foregroundCallState); - intent.putExtra(TelephonyManager.EXTRA_BACKGROUND_CALL_STATE, backgroundCallState); - mContext.sendBroadcastAsUser(intent, UserHandle.ALL, - android.Manifest.permission.READ_PRECISE_PHONE_STATE); - } - private void broadcastPreciseDataConnectionStateChanged(int state, int networkType, String apnType, String apn, LinkProperties linkProperties, @DataFailureCause int failCause) { diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index b89ca92009c71..9491c445147bd 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -713,31 +713,6 @@ public class TelephonyManager { @Deprecated public static final String EXTRA_INCOMING_NUMBER = "incoming_number"; - /** - * Broadcast intent action indicating that a precise call state - * (cellular) on the device has changed. - * - *

- * 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. - * - *

- * Requires the READ_PRECISE_PHONE_STATE permission. - * - * @see #EXTRA_RINGING_CALL_STATE - * @see #EXTRA_FOREGROUND_CALL_STATE - * @see #EXTRA_BACKGROUND_CALL_STATE - * - *

- * Requires the READ_PRECISE_PHONE_STATE permission. - * @deprecated use {@link PhoneStateListener#LISTEN_PRECISE_CALL_STATE} instead - * @hide - */ - @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) - public static final String ACTION_PRECISE_CALL_STATE_CHANGED = - "android.intent.action.PRECISE_CALL_STATE"; - /** * Broadcast intent action indicating that call disconnect cause has changed. * @@ -757,78 +732,6 @@ public class TelephonyManager { public static final String ACTION_CALL_DISCONNECT_CAUSE_CHANGED = "android.intent.action.CALL_DISCONNECT_CAUSE"; - /** - * The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast and - * {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} 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 and - * {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} 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 and - * {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} 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 and * {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} for an integer