Merge "Remove startActivityFromInCall API" into lmp-dev

This commit is contained in:
Evan Charlton
2014-09-03 20:07:46 +00:00
committed by Android (Google) Code Review
12 changed files with 1 additions and 124 deletions

View File

@@ -28267,7 +28267,6 @@ package android.telecomm {
method public final void setRequestingRingback(boolean);
method public final void setRinging();
method public final void setStatusHints(android.telecomm.StatusHints);
method public final void startActivityFromInCall(android.app.PendingIntent);
method public static java.lang.String stateToString(int);
field public static final int STATE_ACTIVE = 4; // 0x4
field public static final int STATE_DIALING = 3; // 0x3
@@ -28452,7 +28451,6 @@ package android.telecomm {
method public void onParentChanged(android.telecomm.RemoteConnection, android.telecomm.RemoteConnection);
method public void onPostDialWait(android.telecomm.RemoteConnection, java.lang.String);
method public void onRequestingRingback(android.telecomm.RemoteConnection, boolean);
method public void onStartActivityFromInCall(android.telecomm.RemoteConnection, android.app.PendingIntent);
method public void onStateChanged(android.telecomm.RemoteConnection, int);
method public void onStatusHintsChanged(android.telecomm.RemoteConnection, android.telecomm.StatusHints);
}

View File

@@ -346,14 +346,6 @@ public final class Call {
*/
public void onVideoCallChanged(Call call, InCallService.VideoCall videoCall) {}
/**
* Launches an activity for this connection on top of the in-call UI.
*
* @param call The {@code Call} invoking this method.
* @param intent The intent to use to start the activity.
*/
public void onStartActivity(Call call, PendingIntent intent) {}
/**
* Invoked when the {@code Call} is destroyed. Clients should refrain from cleaning
* up their UI for the {@code Call} in response to state transitions. Specifically,
@@ -752,11 +744,6 @@ public final class Call {
firePostDialWait(mRemainingPostDialSequence);
}
/** {@hide} */
final void internalStartActivity(PendingIntent intent) {
fireStartActivity(intent);
}
/** {@hide} */
final void internalSetDisconnected() {
if (mState != Call.STATE_DISCONNECTED) {
@@ -809,12 +796,6 @@ public final class Call {
}
}
private void fireStartActivity(PendingIntent intent) {
for (Listener listener : mListeners) {
listener.onStartActivity(this, intent);
}
}
private void fireCallDestroyed() {
for (Listener listener : mListeners) {
listener.onCallDestroyed(this);

View File

@@ -81,7 +81,6 @@ public abstract class Connection {
Connection c, VideoProvider videoProvider) {}
public void onAudioModeIsVoipChanged(Connection c, boolean isVoip) {}
public void onStatusHintsChanged(Connection c, StatusHints statusHints) {}
public void onStartActivityFromInCall(Connection c, PendingIntent intent) {}
public void onConferenceableConnectionsChanged(
Connection c, List<Connection> conferenceableConnections) {}
public void onConferenceChanged(Connection c, Conference conference) {}
@@ -941,20 +940,6 @@ public abstract class Connection {
}
}
/**
* Launches an activity for this connection on top of the in-call UI.
*
* @param intent The intent to use to start the activity.
*/
public final void startActivityFromInCall(PendingIntent intent) {
if (!intent.isActivity()) {
throw new IllegalArgumentException("Activity intent required.");
}
for (Listener l : mListeners) {
l.onStartActivityFromInCall(this, intent);
}
}
/**
* Notifies this Connection that the {@link #getAudioState()} property has a new value.
*

View File

@@ -462,12 +462,6 @@ public abstract class ConnectionService extends Service {
mAdapter.setStatusHints(id, statusHints);
}
@Override
public void onStartActivityFromInCall(Connection c, PendingIntent intent) {
String id = mIdByConnection.get(c);
mAdapter.startActivityFromInCall(id, intent);
}
@Override
public void onConferenceableConnectionsChanged(
Connection connection, List<Connection> conferenceableConnections) {

View File

@@ -346,13 +346,4 @@ final class ConnectionServiceAdapter implements DeathRecipient {
}
}
}
void startActivityFromInCall(String callId, PendingIntent intent) {
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.startActivityFromInCall(callId, intent);
} catch (RemoteException e) {
}
}
}
}

View File

@@ -57,8 +57,7 @@ final class ConnectionServiceAdapterServant {
private static final int MSG_SET_STATUS_HINTS = 17;
private static final int MSG_SET_HANDLE = 18;
private static final int MSG_SET_CALLER_DISPLAY_NAME = 19;
private static final int MSG_START_ACTIVITY_FROM_IN_CALL = 20;
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 21;
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
private final IConnectionServiceAdapter mDelegate;
@@ -192,16 +191,6 @@ final class ConnectionServiceAdapterServant {
}
break;
}
case MSG_START_ACTIVITY_FROM_IN_CALL: {
SomeArgs args = (SomeArgs) msg.obj;
try {
mDelegate.startActivityFromInCall(
(String) args.arg1, (PendingIntent) args.arg2);
} finally {
args.recycle();
}
break;
}
case MSG_SET_CONFERENCEABLE_CONNECTIONS: {
SomeArgs args = (SomeArgs) msg.obj;
try {
@@ -351,14 +340,6 @@ final class ConnectionServiceAdapterServant {
mHandler.obtainMessage(MSG_SET_CALLER_DISPLAY_NAME, args).sendToTarget();
}
@Override
public final void startActivityFromInCall(String connectionId, PendingIntent intent) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId;
args.arg2 = intent;
mHandler.obtainMessage(MSG_START_ACTIVITY_FROM_IN_CALL, args).sendToTarget();
}
@Override
public final void setConferenceableConnections(
String connectionId, List<String> conferenceableConnectionIds) {

View File

@@ -55,7 +55,6 @@ public abstract class InCallService extends Service {
private static final int MSG_SET_POST_DIAL_WAIT = 4;
private static final int MSG_ON_AUDIO_STATE_CHANGED = 5;
private static final int MSG_BRING_TO_FOREGROUND = 6;
private static final int MSG_START_ACTIVITY = 7;
/** Default Handler used to consolidate binder method calls onto a single thread. */
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -89,15 +88,6 @@ public abstract class InCallService extends Service {
case MSG_BRING_TO_FOREGROUND:
mPhone.internalBringToForeground(msg.arg1 == 1);
break;
case MSG_START_ACTIVITY:
SomeArgs args = (SomeArgs) msg.obj;
try {
mPhone.internalStartActivity(
(String) args.arg1, (PendingIntent) args.arg2);
} finally {
args.recycle();
}
break;
default:
break;
}
@@ -143,14 +133,6 @@ public abstract class InCallService extends Service {
public void bringToForeground(boolean showDialpad) {
mHandler.obtainMessage(MSG_BRING_TO_FOREGROUND, showDialpad ? 1 : 0, 0).sendToTarget();
}
@Override
public void startActivity(String callId, PendingIntent intent) {
SomeArgs args = SomeArgs.obtain();
args.arg1 = callId;
args.arg2 = intent;
mHandler.obtainMessage(MSG_START_ACTIVITY, args).sendToTarget();
}
}
private Phone mPhone;

View File

@@ -150,14 +150,6 @@ public final class Phone {
fireBringToForeground(showDialpad);
}
/** {@hide} */
final void internalStartActivity(String telecommId, PendingIntent intent) {
Call call = mCallByTelecommCallId.get(telecommId);
if (call != null) {
call.internalStartActivity(intent);
}
}
/**
* Called to destroy the phone and cleanup any lingering calls.
* @hide

View File

@@ -162,16 +162,6 @@ public final class RemoteConnection {
*/
public void onVideoStateChanged(RemoteConnection connection, int videoState) {}
/**
* Indicates that this {@code RemoteConnection} is requesting that the in-call UI
* launch the specified activity.
*
* @param connection The {@code RemoteConnection} invoking this method.
* @param intent A {@link PendingIntent} that the {@code RemoteConnection} wishes to
* have launched on its behalf.
*/
public void onStartActivityFromInCall(RemoteConnection connection, PendingIntent intent) {}
/**
* 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.
@@ -728,13 +718,6 @@ public final class RemoteConnection {
}
}
/** @hide */
void startActivityFromInCall(PendingIntent intent) {
for (Listener l : mListeners) {
l.onStartActivityFromInCall(this, intent);
}
}
/** @hide */
void setConferenceableConnections(List<RemoteConnection> conferenceableConnections) {
mConferenceableConnections.clear();

View File

@@ -260,12 +260,6 @@ final class RemoteConnectionService {
.setCallerDisplayName(callerDisplayName, presentation);
}
@Override
public void startActivityFromInCall(String callId, PendingIntent intent) {
findConnectionForAction(callId, "startActivityFromInCall")
.startActivityFromInCall(intent);
}
@Override
public IBinder asBinder() {
throw new UnsupportedOperationException();

View File

@@ -76,6 +76,4 @@ oneway interface IConnectionServiceAdapter {
void setCallerDisplayName(String callId, String callerDisplayName, int presentation);
void setConferenceableConnections(String callId, in List<String> conferenceableCallIds);
void startActivityFromInCall(String callId, in PendingIntent intent);
}

View File

@@ -43,6 +43,4 @@ oneway interface IInCallService {
void onAudioStateChanged(in AudioState audioState);
void bringToForeground(boolean showDialpad);
void startActivity(String callId, in PendingIntent intent);
}