Merge "Remove ACTION_PRECISE_CALL_STATE_CHANGED and its extras."

This commit is contained in:
Meng Wang
2019-12-11 17:49:32 +00:00
committed by Gerrit Code Review
2 changed files with 0 additions and 109 deletions

View File

@@ -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) {

View File

@@ -702,31 +702,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.
*
* <p>
* 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.
*
* <p class="note">
* Requires the READ_PRECISE_PHONE_STATE permission.
*
* @see #EXTRA_RINGING_CALL_STATE
* @see #EXTRA_FOREGROUND_CALL_STATE
* @see #EXTRA_BACKGROUND_CALL_STATE
*
* <p class="note">
* 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.
*
@@ -746,78 +721,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
*
* <p class="note">
* 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
*
* <p class="note">
* 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
*
* <p class="note">
* 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