summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-09-03 10:07:03 -0700
committerEvan Charlton <evanc@google.com>2014-09-03 10:07:03 -0700
commit23dc241d5e4641ee2acd4b5f7865c66d9f58c9f1 (patch)
tree62f4ef1918d84b871acba3b86b26303aa49a8b8f /telecomm
parentf0e57e10edb0f76d1675285d352bba69838d407c (diff)
downloadframeworks_base-23dc241d5e4641ee2acd4b5f7865c66d9f58c9f1.zip
frameworks_base-23dc241d5e4641ee2acd4b5f7865c66d9f58c9f1.tar.gz
frameworks_base-23dc241d5e4641ee2acd4b5f7865c66d9f58c9f1.tar.bz2
Remove startActivityFromInCall API
Rip out the startActivityFromInCall API until we can replace it with something better. Bug: 16988478 Change-Id: Ib7b0493353262d9e795d78b78a98dd29e7a3f88e
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/Call.java19
-rw-r--r--telecomm/java/android/telecomm/Connection.java15
-rw-r--r--telecomm/java/android/telecomm/ConnectionService.java6
-rw-r--r--telecomm/java/android/telecomm/ConnectionServiceAdapter.java9
-rw-r--r--telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java21
-rw-r--r--telecomm/java/android/telecomm/InCallService.java18
-rw-r--r--telecomm/java/android/telecomm/Phone.java8
-rw-r--r--telecomm/java/android/telecomm/RemoteConnection.java17
-rw-r--r--telecomm/java/android/telecomm/RemoteConnectionService.java6
-rw-r--r--telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl2
-rw-r--r--telecomm/java/com/android/internal/telecomm/IInCallService.aidl2
11 files changed, 1 insertions, 122 deletions
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index 7c596c1..5bf0855 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecomm/Call.java
@@ -347,14 +347,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,
* clients should not assume that a {@link #onStateChanged(Call, int)} with a state of
@@ -753,11 +745,6 @@ public final class Call {
}
/** {@hide} */
- final void internalStartActivity(PendingIntent intent) {
- fireStartActivity(intent);
- }
-
- /** {@hide} */
final void internalSetDisconnected() {
if (mState != Call.STATE_DISCONNECTED) {
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);
diff --git a/telecomm/java/android/telecomm/Connection.java b/telecomm/java/android/telecomm/Connection.java
index f349659..4d6e267 100644
--- a/telecomm/java/android/telecomm/Connection.java
+++ b/telecomm/java/android/telecomm/Connection.java
@@ -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) {}
@@ -942,20 +941,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.
*
* @param state The new call audio state.
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 19cf622..17826bd 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -463,12 +463,6 @@ public abstract class ConnectionService extends Service {
}
@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) {
mAdapter.setConferenceableConnections(
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java b/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
index cb63646..e3dc713 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
+++ b/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
@@ -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) {
- }
- }
- }
}
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
index 0e1c516..21e99db 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
+++ b/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
@@ -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 {
@@ -352,14 +341,6 @@ final class ConnectionServiceAdapterServant {
}
@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) {
SomeArgs args = SomeArgs.obtain();
diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecomm/InCallService.java
index cbcee75..0b009fa 100644
--- a/telecomm/java/android/telecomm/InCallService.java
+++ b/telecomm/java/android/telecomm/InCallService.java
@@ -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;
diff --git a/telecomm/java/android/telecomm/Phone.java b/telecomm/java/android/telecomm/Phone.java
index d90d954..8831f8f 100644
--- a/telecomm/java/android/telecomm/Phone.java
+++ b/telecomm/java/android/telecomm/Phone.java
@@ -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
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecomm/RemoteConnection.java
index b7e4b2a..31afb4b 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecomm/RemoteConnection.java
@@ -163,16 +163,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.
*
@@ -729,13 +719,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();
mConferenceableConnections.addAll(conferenceableConnections);
diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecomm/RemoteConnectionService.java
index 51722fe..0b6badb 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionService.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionService.java
@@ -261,12 +261,6 @@ final class RemoteConnectionService {
}
@Override
- public void startActivityFromInCall(String callId, PendingIntent intent) {
- findConnectionForAction(callId, "startActivityFromInCall")
- .startActivityFromInCall(intent);
- }
-
- @Override
public IBinder asBinder() {
throw new UnsupportedOperationException();
}
diff --git a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
index ef1769f..610178e 100644
--- a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
@@ -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);
}
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
index 5d4992f..23dbaf4 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
@@ -43,6 +43,4 @@ oneway interface IInCallService {
void onAudioStateChanged(in AudioState audioState);
void bringToForeground(boolean showDialpad);
-
- void startActivity(String callId, in PendingIntent intent);
}