diff options
author | Jay Shrauner <shrauner@google.com> | 2015-04-16 12:52:19 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-04-16 15:05:05 -0700 |
commit | 6f20a6a2b40e8ff362cf4cad977ebdae5ad999da (patch) | |
tree | c2b5d47f29d163187a6b40872e8617ec93c9e941 /telecomm/java/android | |
parent | c8769de8316562d4f047413d1740ff5ef02b9d2d (diff) | |
download | frameworks_base-6f20a6a2b40e8ff362cf4cad977ebdae5ad999da.zip frameworks_base-6f20a6a2b40e8ff362cf4cad977ebdae5ad999da.tar.gz frameworks_base-6f20a6a2b40e8ff362cf4cad977ebdae5ad999da.tar.bz2 |
DO NOT MERGE Remove connection substate
Bug:20300433
Change-Id: Ifefc08b5165de3e0b6ce92007e5f612879dcc4d9
Diffstat (limited to 'telecomm/java/android')
9 files changed, 10 insertions, 204 deletions
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 2a9e539..43ca153 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -233,7 +233,6 @@ public final class Call { private final int mVideoState; private final StatusHints mStatusHints; private final Bundle mExtras; - private final int mCallSubstate; /** * Whether the supplied capabilities supports the specified capability. @@ -430,14 +429,6 @@ public final class Call { return mExtras; } - /** - * @return The substate of the {@code Call}. - * @hide - */ - public int getCallSubstate() { - return mCallSubstate; - } - @Override public boolean equals(Object o) { if (o instanceof Details) { @@ -456,8 +447,7 @@ public final class Call { Objects.equals(mGatewayInfo, d.mGatewayInfo) && Objects.equals(mVideoState, d.mVideoState) && Objects.equals(mStatusHints, d.mStatusHints) && - Objects.equals(mExtras, d.mExtras) && - Objects.equals(mCallSubstate, d.mCallSubstate); + Objects.equals(mExtras, d.mExtras); } return false; } @@ -477,8 +467,7 @@ public final class Call { Objects.hashCode(mGatewayInfo) + Objects.hashCode(mVideoState) + Objects.hashCode(mStatusHints) + - Objects.hashCode(mExtras) + - Objects.hashCode(mCallSubstate); + Objects.hashCode(mExtras); } /** {@hide} */ @@ -495,8 +484,7 @@ public final class Call { GatewayInfo gatewayInfo, int videoState, StatusHints statusHints, - Bundle extras, - int callSubstate) { + Bundle extras) { mHandle = handle; mHandlePresentation = handlePresentation; mCallerDisplayName = callerDisplayName; @@ -510,7 +498,6 @@ public final class Call { mVideoState = videoState; mStatusHints = statusHints; mExtras = extras; - mCallSubstate = callSubstate; } } @@ -889,8 +876,7 @@ public final class Call { parcelableCall.getGatewayInfo(), parcelableCall.getVideoState(), parcelableCall.getStatusHints(), - parcelableCall.getExtras(), - parcelableCall.getCallSubstate()); + parcelableCall.getExtras()); boolean detailsChanged = !Objects.equals(mDetails, details); if (detailsChanged) { mDetails = details; diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 99fc6b9..9ced4ae 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -201,48 +201,6 @@ public abstract class Connection implements IConferenceable { // Next CAPABILITY value: 0x00200000 //********************************************************************************************** - /** - * Call substate bitmask values - */ - - /* Default case */ - /** - * @hide - */ - public static final int SUBSTATE_NONE = 0; - - /* Indicates that the call is connected but audio attribute is suspended */ - /** - * @hide - */ - public static final int SUBSTATE_AUDIO_CONNECTED_SUSPENDED = 0x1; - - /* Indicates that the call is connected but video attribute is suspended */ - /** - * @hide - */ - public static final int SUBSTATE_VIDEO_CONNECTED_SUSPENDED = 0x2; - - /* Indicates that the call is established but media retry is needed */ - /** - * @hide - */ - public static final int SUBSTATE_AVP_RETRY = 0x4; - - /* Indicates that the call is multitasking */ - /** - * @hide - */ - public static final int SUBSTATE_MEDIA_PAUSED = 0x8; - - /* Mask containing all the call substate bits set */ - /** - * @hide - */ - public static final int SUBSTATE_ALL = SUBSTATE_AUDIO_CONNECTED_SUSPENDED | - SUBSTATE_VIDEO_CONNECTED_SUSPENDED | SUBSTATE_AVP_RETRY | - SUBSTATE_MEDIA_PAUSED; - // Flag controlling whether PII is emitted into the logs private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG); @@ -381,7 +339,6 @@ public abstract class Connection implements IConferenceable { public void onConferenceParticipantsChanged(Connection c, List<ConferenceParticipant> participants) {} public void onConferenceStarted() {} - public void onCallSubstateChanged(Connection c, int substate) {} } public static abstract class VideoProvider { @@ -852,7 +809,6 @@ public abstract class Connection implements IConferenceable { private DisconnectCause mDisconnectCause; private Conference mConference; private ConnectionService mConnectionService; - private int mCallSubstate; /** * Create a new Connection. @@ -911,21 +867,6 @@ public abstract class Connection implements IConferenceable { } /** - * Returns the call substate of the call. - * Valid values: {@link Connection#SUBSTATE_NONE}, - * {@link Connection#SUBSTATE_AUDIO_CONNECTED_SUSPENDED}, - * {@link Connection#SUBSTATE_VIDEO_CONNECTED_SUSPENDED}, - * {@link Connection#SUBSTATE_AVP_RETRY}, - * {@link Connection#SUBSTATE_MEDIA_PAUSED}. - * - * @param callSubstate The new call substate. - * @hide - */ - public final int getCallSubstate() { - return mCallSubstate; - } - - /** * @return The audio state of the connection, describing how its audio is currently * being routed by the system. This is {@code null} if this Connection * does not directly know about its audio state. @@ -1099,25 +1040,6 @@ public abstract class Connection implements IConferenceable { } /** - * Set the call substate for the connection. - * Valid values: {@link Connection#SUBSTATE_NONE}, - * {@link Connection#SUBSTATE_AUDIO_CONNECTED_SUSPENDED}, - * {@link Connection#SUBSTATE_VIDEO_CONNECTED_SUSPENDED}, - * {@link Connection#SUBSTATE_AVP_RETRY}, - * {@link Connection#SUBSTATE_MEDIA_PAUSED}. - * - * @param callSubstate The new call substate. - * @hide - */ - public final void setCallSubstate(int callSubstate) { - Log.d(this, "setCallSubstate %d", callSubstate); - mCallSubstate = callSubstate; - for (Listener l : mListeners) { - l.onCallSubstateChanged(this, mCallSubstate); - } - } - - /** * Sets state to active (e.g., an ongoing connection where two or more parties can actively * communicate). */ diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 1f40842..aad7fcb 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -562,13 +562,6 @@ public abstract class ConnectionService extends Service { mAdapter.setIsConferenced(id, conferenceId); } } - - @Override - public void onCallSubstateChanged(Connection c, int callSubstate) { - String id = mIdByConnection.get(c); - Log.d(this, "Adapter set call substate %d", callSubstate); - mAdapter.setCallSubstate(id, callSubstate); - } }; /** {@inheritDoc} */ @@ -638,8 +631,7 @@ public abstract class ConnectionService extends Service { connection.getAudioModeIsVoip(), connection.getStatusHints(), connection.getDisconnectCause(), - createIdList(connection.getConferenceables()), - connection.getCallSubstate())); + createIdList(connection.getConferenceables()))); } private void abort(String callId) { @@ -963,7 +955,7 @@ public abstract class ConnectionService extends Service { connection.getAudioModeIsVoip(), connection.getStatusHints(), connection.getDisconnectCause(), - emptyList, connection.getCallSubstate()); + emptyList); mAdapter.addExistingConnection(id, parcelableConnection); } } diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapter.java b/telecomm/java/android/telecom/ConnectionServiceAdapter.java index a410976..d026a28 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapter.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapter.java @@ -369,26 +369,4 @@ final class ConnectionServiceAdapter implements DeathRecipient { } } } - - /** - * Set the call substate for the connection. - * Valid values: {@link Connection#CALL_SUBSTATE_NONE}, - * {@link Connection#CALL_SUBSTATE_AUDIO_CONNECTED_SUSPENDED}, - * {@link Connection#CALL_SUBSTATE_VIDEO_CONNECTED_SUSPENDED}, - * {@link Connection#CALL_SUBSTATE_AVP_RETRY}, - * {@link Connection#CALL_SUBSTATE_MEDIA_PAUSED}. - * - * @param callId The unique ID of the call to set the substate for. - * @param callSubstate The new call substate. - * @hide - */ - public final void setCallSubstate(String callId, int callSubstate) { - Log.v(this, "setCallSubstate: %d", callSubstate); - for (IConnectionServiceAdapter adapter : mAdapters) { - try { - adapter.setCallSubstate(callId, callSubstate); - } catch (RemoteException ignored) { - } - } - } } diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java index 5f93789..429f296 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java @@ -59,7 +59,6 @@ final class ConnectionServiceAdapterServant { private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20; private static final int MSG_ADD_EXISTING_CONNECTION = 21; private static final int MSG_ON_POST_DIAL_CHAR = 22; - private static final int MSG_SET_CALL_SUBSTATE = 23; private final IConnectionServiceAdapter mDelegate; @@ -221,10 +220,6 @@ final class ConnectionServiceAdapterServant { } break; } - case MSG_SET_CALL_SUBSTATE: { - mDelegate.setCallSubstate((String) msg.obj, msg.arg1); - break; - } } } }; @@ -389,12 +384,6 @@ final class ConnectionServiceAdapterServant { args.arg2 = connection; mHandler.obtainMessage(MSG_ADD_EXISTING_CONNECTION, args).sendToTarget(); } - - @Override - public void setCallSubstate(String connectionId, int callSubstate) { - mHandler.obtainMessage(MSG_SET_CALL_SUBSTATE, callSubstate, 0, - connectionId).sendToTarget(); - } }; public ConnectionServiceAdapterServant(IConnectionServiceAdapter delegate) { diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java index bf6c318..1a30910 100644 --- a/telecomm/java/android/telecom/ParcelableCall.java +++ b/telecomm/java/android/telecom/ParcelableCall.java @@ -55,7 +55,6 @@ public final class ParcelableCall implements Parcelable { private final int mVideoState; private final List<String> mConferenceableCallIds; private final Bundle mExtras; - private int mCallSubstate; public ParcelableCall( String id, @@ -78,8 +77,7 @@ public final class ParcelableCall implements Parcelable { StatusHints statusHints, int videoState, List<String> conferenceableCallIds, - Bundle extras, - int callSubstate) { + Bundle extras) { mId = id; mState = state; mDisconnectCause = disconnectCause; @@ -101,7 +99,6 @@ public final class ParcelableCall implements Parcelable { mVideoState = videoState; mConferenceableCallIds = Collections.unmodifiableList(conferenceableCallIds); mExtras = extras; - mCallSubstate = callSubstate; } /** The unique ID of the call. */ @@ -239,14 +236,6 @@ public final class ParcelableCall implements Parcelable { } /** - * The call substate. - * @return The substate of the call. - */ - public int getCallSubstate() { - return mCallSubstate; - } - - /** * Indicates to the receiver of the {@link ParcelableCall} whether a change has occurred in the * {@link android.telecom.InCallService.VideoCall} associated with this call. Since * {@link #getVideoCall()} creates a new {@link VideoCallImpl}, it is useful to know whether @@ -289,7 +278,6 @@ public final class ParcelableCall implements Parcelable { List<String> conferenceableCallIds = new ArrayList<>(); source.readList(conferenceableCallIds, classLoader); Bundle extras = source.readParcelable(classLoader); - int callSubstate = source.readInt(); return new ParcelableCall( id, state, @@ -311,8 +299,7 @@ public final class ParcelableCall implements Parcelable { statusHints, videoState, conferenceableCallIds, - extras, - callSubstate); + extras); } @Override @@ -352,7 +339,6 @@ public final class ParcelableCall implements Parcelable { destination.writeInt(mVideoState); destination.writeList(mConferenceableCallIds); destination.writeParcelable(mExtras, 0); - destination.writeInt(mCallSubstate); } @Override diff --git a/telecomm/java/android/telecom/ParcelableConnection.java b/telecomm/java/android/telecom/ParcelableConnection.java index b60b99d..552e250 100644 --- a/telecomm/java/android/telecom/ParcelableConnection.java +++ b/telecomm/java/android/telecom/ParcelableConnection.java @@ -46,7 +46,6 @@ public final class ParcelableConnection implements Parcelable { private final StatusHints mStatusHints; private final DisconnectCause mDisconnectCause; private final List<String> mConferenceableConnectionIds; - private final int mCallSubstate; /** @hide */ public ParcelableConnection( @@ -63,8 +62,7 @@ public final class ParcelableConnection implements Parcelable { boolean isVoipAudioMode, StatusHints statusHints, DisconnectCause disconnectCause, - List<String> conferenceableConnectionIds, - int callSubstate) { + List<String> conferenceableConnectionIds) { mPhoneAccount = phoneAccount; mState = state; mConnectionCapabilities = capabilities; @@ -79,7 +77,6 @@ public final class ParcelableConnection implements Parcelable { mStatusHints = statusHints; mDisconnectCause = disconnectCause; this.mConferenceableConnectionIds = conferenceableConnectionIds; - mCallSubstate = callSubstate; } public PhoneAccountHandle getPhoneAccount() { @@ -139,10 +136,6 @@ public final class ParcelableConnection implements Parcelable { return mConferenceableConnectionIds; } - public int getCallSubstate() { - return mCallSubstate; - } - @Override public String toString() { return new StringBuilder() @@ -177,7 +170,6 @@ public final class ParcelableConnection implements Parcelable { DisconnectCause disconnectCause = source.readParcelable(classLoader); List<String> conferenceableConnectionIds = new ArrayList<>(); source.readStringList(conferenceableConnectionIds); - int callSubstate = source.readInt(); return new ParcelableConnection( phoneAccount, @@ -193,8 +185,7 @@ public final class ParcelableConnection implements Parcelable { audioModeIsVoip, statusHints, disconnectCause, - conferenceableConnectionIds, - callSubstate); + conferenceableConnectionIds); } @Override @@ -227,6 +218,5 @@ public final class ParcelableConnection implements Parcelable { destination.writeParcelable(mStatusHints, 0); destination.writeParcelable(mDisconnectCause, 0); destination.writeStringList(mConferenceableConnectionIds); - destination.writeInt(mCallSubstate); } } diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java index eec8076..4ecfd50 100644 --- a/telecomm/java/android/telecom/RemoteConnection.java +++ b/telecomm/java/android/telecom/RemoteConnection.java @@ -153,16 +153,6 @@ public final class RemoteConnection { public void onVideoStateChanged(RemoteConnection connection, int videoState) {} /** - * Indicates that the call substate of this {@code RemoteConnection} has changed. - * See {@link #getCallSubstate()}. - * - * @param connection The {@code RemoteConnection} invoking this method. - * @param callSubstate The new call substate of the {@code RemoteConnection}. - * @hide - */ - public void onCallSubstateChanged(RemoteConnection connection, int callSubstate) {} - - /** * Indicates that this {@code RemoteConnection} has been destroyed. No further requests * should be made to the {@code RemoteConnection}, and references to it should be cleared. * @@ -414,7 +404,6 @@ public final class RemoteConnection { private boolean mConnected; private int mConnectionCapabilities; private int mVideoState; - private int mCallSubstate; private VideoProvider mVideoProvider; private boolean mIsVoipAudioMode; private StatusHints mStatusHints; @@ -595,15 +584,6 @@ public final class RemoteConnection { } /** - * - * @return The call substate of the {@code RemoteConnection}. See - * @hide - */ - public int getCallSubstate() { - return mCallSubstate; - } - - /** * Obtains the video provider of this {@code RemoteConnection}. * @return The video provider associated with this {@code RemoteConnection}. * @hide @@ -916,16 +896,6 @@ public final class RemoteConnection { /** * @hide */ - void setCallSubstate(int callSubstate) { - mCallSubstate = callSubstate; - for (Callback c : mCallbacks) { - c.onCallSubstateChanged(this, callSubstate); - } - } - - /** - * @hide - */ void setVideoProvider(VideoProvider videoProvider) { mVideoProvider = videoProvider; for (Callback c : mCallbacks) { diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java index 179db55..43a92cb 100644 --- a/telecomm/java/android/telecom/RemoteConnectionService.java +++ b/telecomm/java/android/telecom/RemoteConnectionService.java @@ -79,7 +79,6 @@ final class RemoteConnectionService { } connection.setConferenceableConnections(conferenceable); connection.setVideoState(parcel.getVideoState()); - connection.setCallSubstate(parcel.getCallSubstate()); if (connection.getState() == Connection.STATE_DISCONNECTED) { // ... then, if it was created in a disconnected state, that indicates // failure on the providing end, so immediately mark it destroyed @@ -307,12 +306,6 @@ final class RemoteConnectionService { mOurConnectionServiceImpl.addRemoteExistingConnection(remoteConnction); } - - @Override - public void setCallSubstate(String callId, int callSubstate) { - findConnectionForAction(callId, "callSubstate") - .setCallSubstate(callSubstate); - } }; private final ConnectionServiceAdapterServant mServant = |