Modify ConnectionServiceAdapter to include Session

Modifies the ConnectionServiceAdapter to include Session Information in
the AIDL interface so that external Sessions can be started in Telecom
from Telephony.

Test: Manual testing and Unit Tests pass
Bug: 26571395
Change-Id: I31bbfe433dd062a50bd05083e1a639dd4cd03403
This commit is contained in:
Brad Ebinger
2016-10-28 12:29:55 -07:00
parent fdfc79a878
commit 4d75bee99b
4 changed files with 213 additions and 150 deletions

View File

@@ -93,7 +93,8 @@ final class ConnectionServiceAdapter implements DeathRecipient {
ParcelableConnection connection) { ParcelableConnection connection) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.handleCreateConnectionComplete(id, request, connection); adapter.handleCreateConnectionComplete(id, request, connection,
Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -108,7 +109,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setActive(String callId) { void setActive(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setActive(callId); adapter.setActive(callId, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -122,7 +123,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setRinging(String callId) { void setRinging(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setRinging(callId); adapter.setRinging(callId, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -136,7 +137,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setDialing(String callId) { void setDialing(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setDialing(callId); adapter.setDialing(callId, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -151,7 +152,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setPulling(String callId) { void setPulling(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setPulling(callId); adapter.setPulling(callId, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -167,7 +168,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setDisconnected(String callId, DisconnectCause disconnectCause) { void setDisconnected(String callId, DisconnectCause disconnectCause) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setDisconnected(callId, disconnectCause); adapter.setDisconnected(callId, disconnectCause, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -181,7 +182,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setOnHold(String callId) { void setOnHold(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setOnHold(callId); adapter.setOnHold(callId, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -196,7 +197,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setRingbackRequested(String callId, boolean ringback) { void setRingbackRequested(String callId, boolean ringback) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setRingbackRequested(callId, ringback); adapter.setRingbackRequested(callId, ringback, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -205,7 +206,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setConnectionCapabilities(String callId, int capabilities) { void setConnectionCapabilities(String callId, int capabilities) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setConnectionCapabilities(callId, capabilities); adapter.setConnectionCapabilities(callId, capabilities, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -214,7 +215,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setConnectionProperties(String callId, int properties) { void setConnectionProperties(String callId, int properties) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setConnectionProperties(callId, properties); adapter.setConnectionProperties(callId, properties, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -232,7 +233,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
Log.d(this, "sending connection %s with conference %s", callId, conferenceCallId); Log.d(this, "sending connection %s with conference %s", callId, conferenceCallId);
adapter.setIsConferenced(callId, conferenceCallId); adapter.setIsConferenced(callId, conferenceCallId, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -247,7 +248,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
Log.d(this, "merge failed for call %s", callId); Log.d(this, "merge failed for call %s", callId);
adapter.setConferenceMergeFailed(callId); adapter.setConferenceMergeFailed(callId, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -262,7 +263,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void removeCall(String callId) { void removeCall(String callId) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.removeCall(callId); adapter.removeCall(callId, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -271,7 +272,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void onPostDialWait(String callId, String remaining) { void onPostDialWait(String callId, String remaining) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.onPostDialWait(callId, remaining); adapter.onPostDialWait(callId, remaining, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -280,7 +281,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void onPostDialChar(String callId, char nextChar) { void onPostDialChar(String callId, char nextChar) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.onPostDialChar(callId, nextChar); adapter.onPostDialChar(callId, nextChar, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -294,7 +295,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void addConferenceCall(String callId, ParcelableConference parcelableConference) { void addConferenceCall(String callId, ParcelableConference parcelableConference) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.addConferenceCall(callId, parcelableConference); adapter.addConferenceCall(callId, parcelableConference, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -307,7 +308,8 @@ final class ConnectionServiceAdapter implements DeathRecipient {
// Only supported when there is only one adapter. // Only supported when there is only one adapter.
if (mAdapters.size() == 1) { if (mAdapters.size() == 1) {
try { try {
mAdapters.iterator().next().queryRemoteConnectionServices(callback); mAdapters.iterator().next().queryRemoteConnectionServices(callback,
Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(this, e, "Exception trying to query for remote CSs"); Log.e(this, e, "Exception trying to query for remote CSs");
} }
@@ -326,7 +328,8 @@ final class ConnectionServiceAdapter implements DeathRecipient {
try { try {
adapter.setVideoProvider( adapter.setVideoProvider(
callId, callId,
videoProvider == null ? null : videoProvider.getInterface()); videoProvider == null ? null : videoProvider.getInterface(),
Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -341,7 +344,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setIsVoipAudioMode(String callId, boolean isVoip) { void setIsVoipAudioMode(String callId, boolean isVoip) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setIsVoipAudioMode(callId, isVoip); adapter.setIsVoipAudioMode(callId, isVoip, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -350,7 +353,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setStatusHints(String callId, StatusHints statusHints) { void setStatusHints(String callId, StatusHints statusHints) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setStatusHints(callId, statusHints); adapter.setStatusHints(callId, statusHints, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -359,7 +362,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setAddress(String callId, Uri address, int presentation) { void setAddress(String callId, Uri address, int presentation) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setAddress(callId, address, presentation); adapter.setAddress(callId, address, presentation, Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -368,7 +371,8 @@ final class ConnectionServiceAdapter implements DeathRecipient {
void setCallerDisplayName(String callId, String callerDisplayName, int presentation) { void setCallerDisplayName(String callId, String callerDisplayName, int presentation) {
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setCallerDisplayName(callId, callerDisplayName, presentation); adapter.setCallerDisplayName(callId, callerDisplayName, presentation,
Log.getExternalSession());
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -389,7 +393,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "setVideoState: %d", videoState); Log.v(this, "setVideoState: %d", videoState);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setVideoState(callId, videoState); adapter.setVideoState(callId, videoState, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -399,7 +403,8 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "setConferenceableConnections: %s, %s", callId, conferenceableCallIds); Log.v(this, "setConferenceableConnections: %s, %s", callId, conferenceableCallIds);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.setConferenceableConnections(callId, conferenceableCallIds); adapter.setConferenceableConnections(callId, conferenceableCallIds,
Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -415,7 +420,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "addExistingConnection: %s", callId); Log.v(this, "addExistingConnection: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.addExistingConnection(callId, connection); adapter.addExistingConnection(callId, connection, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -431,7 +436,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "putExtras: %s", callId); Log.v(this, "putExtras: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.putExtras(callId, extras); adapter.putExtras(callId, extras, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -450,7 +455,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
try { try {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putBoolean(key, value); bundle.putBoolean(key, value);
adapter.putExtras(callId, bundle); adapter.putExtras(callId, bundle, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -469,7 +474,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
try { try {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt(key, value); bundle.putInt(key, value);
adapter.putExtras(callId, bundle); adapter.putExtras(callId, bundle, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -488,7 +493,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
try { try {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(key, value); bundle.putString(key, value);
adapter.putExtras(callId, bundle); adapter.putExtras(callId, bundle, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -503,7 +508,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "removeExtras: %s %s", callId, keys); Log.v(this, "removeExtras: %s %s", callId, keys);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.removeExtras(callId, keys); adapter.removeExtras(callId, keys, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }
@@ -520,7 +525,7 @@ final class ConnectionServiceAdapter implements DeathRecipient {
Log.v(this, "onConnectionEvent: %s", event); Log.v(this, "onConnectionEvent: %s", event);
for (IConnectionServiceAdapter adapter : mAdapters) { for (IConnectionServiceAdapter adapter : mAdapters) {
try { try {
adapter.onConnectionEvent(callId, event, extras); adapter.onConnectionEvent(callId, event, extras, Log.getExternalSession());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {
} }
} }

View File

@@ -21,6 +21,7 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.RemoteException; import android.os.RemoteException;
import android.telecom.Logging.Session;
import com.android.internal.os.SomeArgs; import com.android.internal.os.SomeArgs;
import com.android.internal.telecom.IConnectionServiceAdapter; import com.android.internal.telecom.IConnectionServiceAdapter;
@@ -87,49 +88,55 @@ final class ConnectionServiceAdapterServant {
mDelegate.handleCreateConnectionComplete( mDelegate.handleCreateConnectionComplete(
(String) args.arg1, (String) args.arg1,
(ConnectionRequest) args.arg2, (ConnectionRequest) args.arg2,
(ParcelableConnection) args.arg3); (ParcelableConnection) args.arg3,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
break; break;
} }
case MSG_SET_ACTIVE: case MSG_SET_ACTIVE:
mDelegate.setActive((String) msg.obj); mDelegate.setActive((String) msg.obj, null /*Session.Info*/);
break; break;
case MSG_SET_RINGING: case MSG_SET_RINGING:
mDelegate.setRinging((String) msg.obj); mDelegate.setRinging((String) msg.obj, null /*Session.Info*/);
break; break;
case MSG_SET_DIALING: case MSG_SET_DIALING:
mDelegate.setDialing((String) msg.obj); mDelegate.setDialing((String) msg.obj, null /*Session.Info*/);
break; break;
case MSG_SET_PULLING: case MSG_SET_PULLING:
mDelegate.setPulling((String) msg.obj); mDelegate.setPulling((String) msg.obj, null /*Session.Info*/);
break; break;
case MSG_SET_DISCONNECTED: { case MSG_SET_DISCONNECTED: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setDisconnected((String) args.arg1, (DisconnectCause) args.arg2); mDelegate.setDisconnected((String) args.arg1, (DisconnectCause) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
break; break;
} }
case MSG_SET_ON_HOLD: case MSG_SET_ON_HOLD:
mDelegate.setOnHold((String) msg.obj); mDelegate.setOnHold((String) msg.obj, null /*Session.Info*/);
break; break;
case MSG_SET_RINGBACK_REQUESTED: case MSG_SET_RINGBACK_REQUESTED:
mDelegate.setRingbackRequested((String) msg.obj, msg.arg1 == 1); mDelegate.setRingbackRequested((String) msg.obj, msg.arg1 == 1,
null /*Session.Info*/);
break; break;
case MSG_SET_CONNECTION_CAPABILITIES: case MSG_SET_CONNECTION_CAPABILITIES:
mDelegate.setConnectionCapabilities((String) msg.obj, msg.arg1); mDelegate.setConnectionCapabilities((String) msg.obj, msg.arg1,
null /*Session.Info*/);
break; break;
case MSG_SET_CONNECTION_PROPERTIES: case MSG_SET_CONNECTION_PROPERTIES:
mDelegate.setConnectionProperties((String) msg.obj, msg.arg1); mDelegate.setConnectionProperties((String) msg.obj, msg.arg1,
null /*Session.Info*/);
break; break;
case MSG_SET_IS_CONFERENCED: { case MSG_SET_IS_CONFERENCED: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setIsConferenced((String) args.arg1, (String) args.arg2); mDelegate.setIsConferenced((String) args.arg1, (String) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -139,19 +146,22 @@ final class ConnectionServiceAdapterServant {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.addConferenceCall( mDelegate.addConferenceCall(
(String) args.arg1, (ParcelableConference) args.arg2); (String) args.arg1, (ParcelableConference) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
break; break;
} }
case MSG_REMOVE_CALL: case MSG_REMOVE_CALL:
mDelegate.removeCall((String) msg.obj); mDelegate.removeCall((String) msg.obj,
null /*Session.Info*/);
break; break;
case MSG_ON_POST_DIAL_WAIT: { case MSG_ON_POST_DIAL_WAIT: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.onPostDialWait((String) args.arg1, (String) args.arg2); mDelegate.onPostDialWait((String) args.arg1, (String) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -160,35 +170,39 @@ final class ConnectionServiceAdapterServant {
case MSG_ON_POST_DIAL_CHAR: { case MSG_ON_POST_DIAL_CHAR: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.onPostDialChar((String) args.arg1, (char) args.argi1); mDelegate.onPostDialChar((String) args.arg1, (char) args.argi1,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
break; break;
} }
case MSG_QUERY_REMOTE_CALL_SERVICES: case MSG_QUERY_REMOTE_CALL_SERVICES:
mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj); mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj,
null /*Session.Info*/);
break; break;
case MSG_SET_VIDEO_STATE: case MSG_SET_VIDEO_STATE:
mDelegate.setVideoState((String) msg.obj, msg.arg1); mDelegate.setVideoState((String) msg.obj, msg.arg1, null /*Session.Info*/);
break; break;
case MSG_SET_VIDEO_CALL_PROVIDER: { case MSG_SET_VIDEO_CALL_PROVIDER: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setVideoProvider((String) args.arg1, mDelegate.setVideoProvider((String) args.arg1,
(IVideoProvider) args.arg2); (IVideoProvider) args.arg2, null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
break; break;
} }
case MSG_SET_IS_VOIP_AUDIO_MODE: case MSG_SET_IS_VOIP_AUDIO_MODE:
mDelegate.setIsVoipAudioMode((String) msg.obj, msg.arg1 == 1); mDelegate.setIsVoipAudioMode((String) msg.obj, msg.arg1 == 1,
null /*Session.Info*/);
break; break;
case MSG_SET_STATUS_HINTS: { case MSG_SET_STATUS_HINTS: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setStatusHints((String) args.arg1, (StatusHints) args.arg2); mDelegate.setStatusHints((String) args.arg1, (StatusHints) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -197,7 +211,8 @@ final class ConnectionServiceAdapterServant {
case MSG_SET_ADDRESS: { case MSG_SET_ADDRESS: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setAddress((String) args.arg1, (Uri) args.arg2, args.argi1); mDelegate.setAddress((String) args.arg1, (Uri) args.arg2, args.argi1,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -207,7 +222,8 @@ final class ConnectionServiceAdapterServant {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setCallerDisplayName( mDelegate.setCallerDisplayName(
(String) args.arg1, (String) args.arg2, args.argi1); (String) args.arg1, (String) args.arg2, args.argi1,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -216,8 +232,8 @@ final class ConnectionServiceAdapterServant {
case MSG_SET_CONFERENCEABLE_CONNECTIONS: { case MSG_SET_CONFERENCEABLE_CONNECTIONS: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setConferenceableConnections( mDelegate.setConferenceableConnections((String) args.arg1,
(String) args.arg1, (List<String>) args.arg2); (List<String>) args.arg2, null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -226,8 +242,8 @@ final class ConnectionServiceAdapterServant {
case MSG_ADD_EXISTING_CONNECTION: { case MSG_ADD_EXISTING_CONNECTION: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.addExistingConnection( mDelegate.addExistingConnection((String) args.arg1,
(String) args.arg1, (ParcelableConnection) args.arg2); (ParcelableConnection) args.arg2, null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -236,7 +252,8 @@ final class ConnectionServiceAdapterServant {
case MSG_SET_CONFERENCE_MERGE_FAILED: { case MSG_SET_CONFERENCE_MERGE_FAILED: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.setConferenceMergeFailed((String) args.arg1); mDelegate.setConferenceMergeFailed((String) args.arg1,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -245,7 +262,8 @@ final class ConnectionServiceAdapterServant {
case MSG_PUT_EXTRAS: { case MSG_PUT_EXTRAS: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.putExtras((String) args.arg1, (Bundle) args.arg2); mDelegate.putExtras((String) args.arg1, (Bundle) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -254,7 +272,8 @@ final class ConnectionServiceAdapterServant {
case MSG_REMOVE_EXTRAS: { case MSG_REMOVE_EXTRAS: {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.removeExtras((String) args.arg1, (List<String>) args.arg2); mDelegate.removeExtras((String) args.arg1, (List<String>) args.arg2,
null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -264,7 +283,7 @@ final class ConnectionServiceAdapterServant {
SomeArgs args = (SomeArgs) msg.obj; SomeArgs args = (SomeArgs) msg.obj;
try { try {
mDelegate.onConnectionEvent((String) args.arg1, (String) args.arg2, mDelegate.onConnectionEvent((String) args.arg1, (String) args.arg2,
(Bundle) args.arg3); (Bundle) args.arg3, null /*Session.Info*/);
} finally { } finally {
args.recycle(); args.recycle();
} }
@@ -279,7 +298,8 @@ final class ConnectionServiceAdapterServant {
public void handleCreateConnectionComplete( public void handleCreateConnectionComplete(
String id, String id,
ConnectionRequest request, ConnectionRequest request,
ParcelableConnection connection) { ParcelableConnection connection,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = id; args.arg1 = id;
args.arg2 = request; args.arg2 = request;
@@ -288,28 +308,28 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void setActive(String connectionId) { public void setActive(String connectionId, Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_ACTIVE, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_ACTIVE, connectionId).sendToTarget();
} }
@Override @Override
public void setRinging(String connectionId) { public void setRinging(String connectionId, Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_RINGING, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_RINGING, connectionId).sendToTarget();
} }
@Override @Override
public void setDialing(String connectionId) { public void setDialing(String connectionId, Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_DIALING, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_DIALING, connectionId).sendToTarget();
} }
@Override @Override
public void setPulling(String connectionId) { public void setPulling(String connectionId, Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_PULLING, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_PULLING, connectionId).sendToTarget();
} }
@Override @Override
public void setDisconnected( public void setDisconnected(String connectionId, DisconnectCause disconnectCause,
String connectionId, DisconnectCause disconnectCause) { Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = disconnectCause; args.arg2 = disconnectCause;
@@ -317,39 +337,43 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void setOnHold(String connectionId) { public void setOnHold(String connectionId, Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_ON_HOLD, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_ON_HOLD, connectionId).sendToTarget();
} }
@Override @Override
public void setRingbackRequested(String connectionId, boolean ringback) { public void setRingbackRequested(String connectionId, boolean ringback,
Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_RINGBACK_REQUESTED, ringback ? 1 : 0, 0, connectionId) mHandler.obtainMessage(MSG_SET_RINGBACK_REQUESTED, ringback ? 1 : 0, 0, connectionId)
.sendToTarget(); .sendToTarget();
} }
@Override @Override
public void setConnectionCapabilities(String connectionId, int connectionCapabilities) { public void setConnectionCapabilities(String connectionId, int connectionCapabilities,
Session.Info sessionInfo) {
mHandler.obtainMessage( mHandler.obtainMessage(
MSG_SET_CONNECTION_CAPABILITIES, connectionCapabilities, 0, connectionId) MSG_SET_CONNECTION_CAPABILITIES, connectionCapabilities, 0, connectionId)
.sendToTarget(); .sendToTarget();
} }
@Override @Override
public void setConnectionProperties(String connectionId, int connectionProperties) { public void setConnectionProperties(String connectionId, int connectionProperties,
Session.Info sessionInfo) {
mHandler.obtainMessage( mHandler.obtainMessage(
MSG_SET_CONNECTION_PROPERTIES, connectionProperties, 0, connectionId) MSG_SET_CONNECTION_PROPERTIES, connectionProperties, 0, connectionId)
.sendToTarget(); .sendToTarget();
} }
@Override @Override
public void setConferenceMergeFailed(String callId) { public void setConferenceMergeFailed(String callId, Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = callId; args.arg1 = callId;
mHandler.obtainMessage(MSG_SET_CONFERENCE_MERGE_FAILED, args).sendToTarget(); mHandler.obtainMessage(MSG_SET_CONFERENCE_MERGE_FAILED, args).sendToTarget();
} }
@Override @Override
public void setIsConferenced(String callId, String conferenceCallId) { public void setIsConferenced(String callId, String conferenceCallId,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = callId; args.arg1 = callId;
args.arg2 = conferenceCallId; args.arg2 = conferenceCallId;
@@ -357,7 +381,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void addConferenceCall(String callId, ParcelableConference parcelableConference) { public void addConferenceCall(String callId, ParcelableConference parcelableConference,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = callId; args.arg1 = callId;
args.arg2 = parcelableConference; args.arg2 = parcelableConference;
@@ -365,12 +390,14 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void removeCall(String connectionId) { public void removeCall(String connectionId,
Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_REMOVE_CALL, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_REMOVE_CALL, connectionId).sendToTarget();
} }
@Override @Override
public void onPostDialWait(String connectionId, String remainingDigits) { public void onPostDialWait(String connectionId, String remainingDigits,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = remainingDigits; args.arg2 = remainingDigits;
@@ -378,7 +405,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void onPostDialChar(String connectionId, char nextChar) { public void onPostDialChar(String connectionId, char nextChar,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.argi1 = nextChar; args.argi1 = nextChar;
@@ -386,17 +414,20 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public void queryRemoteConnectionServices(RemoteServiceCallback callback) { public void queryRemoteConnectionServices(RemoteServiceCallback callback,
Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget(); mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget();
} }
@Override @Override
public void setVideoState(String connectionId, int videoState) { public void setVideoState(String connectionId, int videoState,
Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_VIDEO_STATE, videoState, 0, connectionId).sendToTarget(); mHandler.obtainMessage(MSG_SET_VIDEO_STATE, videoState, 0, connectionId).sendToTarget();
} }
@Override @Override
public void setVideoProvider(String connectionId, IVideoProvider videoProvider) { public void setVideoProvider(String connectionId, IVideoProvider videoProvider,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = videoProvider; args.arg2 = videoProvider;
@@ -404,13 +435,15 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void setIsVoipAudioMode(String connectionId, boolean isVoip) { public final void setIsVoipAudioMode(String connectionId, boolean isVoip,
Session.Info sessionInfo) {
mHandler.obtainMessage(MSG_SET_IS_VOIP_AUDIO_MODE, isVoip ? 1 : 0, 0, mHandler.obtainMessage(MSG_SET_IS_VOIP_AUDIO_MODE, isVoip ? 1 : 0, 0,
connectionId).sendToTarget(); connectionId).sendToTarget();
} }
@Override @Override
public final void setStatusHints(String connectionId, StatusHints statusHints) { public final void setStatusHints(String connectionId, StatusHints statusHints,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = statusHints; args.arg2 = statusHints;
@@ -418,7 +451,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void setAddress(String connectionId, Uri address, int presentation) { public final void setAddress(String connectionId, Uri address, int presentation,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = address; args.arg2 = address;
@@ -428,7 +462,8 @@ final class ConnectionServiceAdapterServant {
@Override @Override
public final void setCallerDisplayName( public final void setCallerDisplayName(
String connectionId, String callerDisplayName, int presentation) { String connectionId, String callerDisplayName, int presentation,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = callerDisplayName; args.arg2 = callerDisplayName;
@@ -437,8 +472,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void setConferenceableConnections( public final void setConferenceableConnections(String connectionId,
String connectionId, List<String> conferenceableConnectionIds) { List<String> conferenceableConnectionIds, Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = conferenceableConnectionIds; args.arg2 = conferenceableConnectionIds;
@@ -446,8 +481,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void addExistingConnection( public final void addExistingConnection(String connectionId,
String connectionId, ParcelableConnection connection) { ParcelableConnection connection, Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = connection; args.arg2 = connection;
@@ -455,7 +490,7 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void putExtras(String connectionId, Bundle extras) { public final void putExtras(String connectionId, Bundle extras, Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = extras; args.arg2 = extras;
@@ -463,7 +498,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void removeExtras(String connectionId, List<String> keys) { public final void removeExtras(String connectionId, List<String> keys,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = keys; args.arg2 = keys;
@@ -471,7 +507,8 @@ final class ConnectionServiceAdapterServant {
} }
@Override @Override
public final void onConnectionEvent(String connectionId, String event, Bundle extras) { public final void onConnectionEvent(String connectionId, String event, Bundle extras,
Session.Info sessionInfo) {
SomeArgs args = SomeArgs.obtain(); SomeArgs args = SomeArgs.obtain();
args.arg1 = connectionId; args.arg1 = connectionId;
args.arg2 = event; args.arg2 = event;

View File

@@ -21,6 +21,7 @@ import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.os.IBinder.DeathRecipient; import android.os.IBinder.DeathRecipient;
import android.os.RemoteException; import android.os.RemoteException;
import android.telecom.Logging.Session;
import com.android.internal.telecom.IConnectionService; import com.android.internal.telecom.IConnectionService;
import com.android.internal.telecom.IConnectionServiceAdapter; import com.android.internal.telecom.IConnectionServiceAdapter;
@@ -54,7 +55,8 @@ final class RemoteConnectionService {
public void handleCreateConnectionComplete( public void handleCreateConnectionComplete(
String id, String id,
ConnectionRequest request, ConnectionRequest request,
ParcelableConnection parcel) { ParcelableConnection parcel,
Session.Info info) {
RemoteConnection connection = RemoteConnection connection =
findConnectionForAction(id, "handleCreateConnectionSuccessful"); findConnectionForAction(id, "handleCreateConnectionSuccessful");
if (connection != NULL_CONNECTION && mPendingConnections.contains(connection)) { if (connection != NULL_CONNECTION && mPendingConnections.contains(connection)) {
@@ -95,7 +97,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setActive(String callId) { public void setActive(String callId, Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "setActive") findConnectionForAction(callId, "setActive")
.setState(Connection.STATE_ACTIVE); .setState(Connection.STATE_ACTIVE);
@@ -106,25 +108,26 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setRinging(String callId) { public void setRinging(String callId, Session.Info sessionInfo) {
findConnectionForAction(callId, "setRinging") findConnectionForAction(callId, "setRinging")
.setState(Connection.STATE_RINGING); .setState(Connection.STATE_RINGING);
} }
@Override @Override
public void setDialing(String callId) { public void setDialing(String callId, Session.Info sessionInfo) {
findConnectionForAction(callId, "setDialing") findConnectionForAction(callId, "setDialing")
.setState(Connection.STATE_DIALING); .setState(Connection.STATE_DIALING);
} }
@Override @Override
public void setPulling(String callId) { public void setPulling(String callId, Session.Info sessionInfo) {
findConnectionForAction(callId, "setPulling") findConnectionForAction(callId, "setPulling")
.setState(Connection.STATE_PULLING_CALL); .setState(Connection.STATE_PULLING_CALL);
} }
@Override @Override
public void setDisconnected(String callId, DisconnectCause disconnectCause) { public void setDisconnected(String callId, DisconnectCause disconnectCause,
Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "setDisconnected") findConnectionForAction(callId, "setDisconnected")
.setDisconnected(disconnectCause); .setDisconnected(disconnectCause);
@@ -135,7 +138,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setOnHold(String callId) { public void setOnHold(String callId, Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "setOnHold") findConnectionForAction(callId, "setOnHold")
.setState(Connection.STATE_HOLDING); .setState(Connection.STATE_HOLDING);
@@ -146,13 +149,14 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setRingbackRequested(String callId, boolean ringing) { public void setRingbackRequested(String callId, boolean ringing, Session.Info sessionInfo) {
findConnectionForAction(callId, "setRingbackRequested") findConnectionForAction(callId, "setRingbackRequested")
.setRingbackRequested(ringing); .setRingbackRequested(ringing);
} }
@Override @Override
public void setConnectionCapabilities(String callId, int connectionCapabilities) { public void setConnectionCapabilities(String callId, int connectionCapabilities,
Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "setConnectionCapabilities") findConnectionForAction(callId, "setConnectionCapabilities")
.setConnectionCapabilities(connectionCapabilities); .setConnectionCapabilities(connectionCapabilities);
@@ -163,7 +167,8 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setConnectionProperties(String callId, int connectionProperties) { public void setConnectionProperties(String callId, int connectionProperties,
Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "setConnectionProperties") findConnectionForAction(callId, "setConnectionProperties")
.setConnectionProperties(connectionProperties); .setConnectionProperties(connectionProperties);
@@ -174,7 +179,8 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setIsConferenced(String callId, String conferenceCallId) { public void setIsConferenced(String callId, String conferenceCallId,
Session.Info sessionInfo) {
// Note: callId should not be null; conferenceCallId may be null // Note: callId should not be null; conferenceCallId may be null
RemoteConnection connection = RemoteConnection connection =
findConnectionForAction(callId, "setIsConferenced"); findConnectionForAction(callId, "setIsConferenced");
@@ -195,7 +201,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setConferenceMergeFailed(String callId) { public void setConferenceMergeFailed(String callId, Session.Info sessionInfo) {
// Nothing to do here. // Nothing to do here.
// The event has already been handled and there is no state to update // The event has already been handled and there is no state to update
// in the underlying connection or conference objects // in the underlying connection or conference objects
@@ -203,8 +209,7 @@ final class RemoteConnectionService {
@Override @Override
public void addConferenceCall( public void addConferenceCall(
final String callId, final String callId, ParcelableConference parcel, Session.Info sessionInfo) {
ParcelableConference parcel) {
RemoteConference conference = new RemoteConference(callId, RemoteConference conference = new RemoteConference(callId,
mOutgoingConnectionServiceRpc); mOutgoingConnectionServiceRpc);
@@ -238,7 +243,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void removeCall(String callId) { public void removeCall(String callId, Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "removeCall") findConnectionForAction(callId, "removeCall")
.setDestroyed(); .setDestroyed();
@@ -249,24 +254,26 @@ final class RemoteConnectionService {
} }
@Override @Override
public void onPostDialWait(String callId, String remaining) { public void onPostDialWait(String callId, String remaining, Session.Info sessionInfo) {
findConnectionForAction(callId, "onPostDialWait") findConnectionForAction(callId, "onPostDialWait")
.setPostDialWait(remaining); .setPostDialWait(remaining);
} }
@Override @Override
public void onPostDialChar(String callId, char nextChar) { public void onPostDialChar(String callId, char nextChar, Session.Info sessionInfo) {
findConnectionForAction(callId, "onPostDialChar") findConnectionForAction(callId, "onPostDialChar")
.onPostDialChar(nextChar); .onPostDialChar(nextChar);
} }
@Override @Override
public void queryRemoteConnectionServices(RemoteServiceCallback callback) { public void queryRemoteConnectionServices(RemoteServiceCallback callback,
Session.Info sessionInfo) {
// Not supported from remote connection service. // Not supported from remote connection service.
} }
@Override @Override
public void setVideoProvider(String callId, IVideoProvider videoProvider) { public void setVideoProvider(String callId, IVideoProvider videoProvider,
Session.Info sessionInfo) {
RemoteConnection.VideoProvider remoteVideoProvider = null; RemoteConnection.VideoProvider remoteVideoProvider = null;
if (videoProvider != null) { if (videoProvider != null) {
remoteVideoProvider = new RemoteConnection.VideoProvider(videoProvider); remoteVideoProvider = new RemoteConnection.VideoProvider(videoProvider);
@@ -276,32 +283,34 @@ final class RemoteConnectionService {
} }
@Override @Override
public void setVideoState(String callId, int videoState) { public void setVideoState(String callId, int videoState, Session.Info sessionInfo) {
findConnectionForAction(callId, "setVideoState") findConnectionForAction(callId, "setVideoState")
.setVideoState(videoState); .setVideoState(videoState);
} }
@Override @Override
public void setIsVoipAudioMode(String callId, boolean isVoip) { public void setIsVoipAudioMode(String callId, boolean isVoip, Session.Info sessionInfo) {
findConnectionForAction(callId, "setIsVoipAudioMode") findConnectionForAction(callId, "setIsVoipAudioMode")
.setIsVoipAudioMode(isVoip); .setIsVoipAudioMode(isVoip);
} }
@Override @Override
public void setStatusHints(String callId, StatusHints statusHints) { public void setStatusHints(String callId, StatusHints statusHints,
Session.Info sessionInfo) {
findConnectionForAction(callId, "setStatusHints") findConnectionForAction(callId, "setStatusHints")
.setStatusHints(statusHints); .setStatusHints(statusHints);
} }
@Override @Override
public void setAddress(String callId, Uri address, int presentation) { public void setAddress(String callId, Uri address, int presentation,
Session.Info sessionInfo) {
findConnectionForAction(callId, "setAddress") findConnectionForAction(callId, "setAddress")
.setAddress(address, presentation); .setAddress(address, presentation);
} }
@Override @Override
public void setCallerDisplayName(String callId, String callerDisplayName, public void setCallerDisplayName(String callId, String callerDisplayName,
int presentation) { int presentation, Session.Info sessionInfo) {
findConnectionForAction(callId, "setCallerDisplayName") findConnectionForAction(callId, "setCallerDisplayName")
.setCallerDisplayName(callerDisplayName, presentation); .setCallerDisplayName(callerDisplayName, presentation);
} }
@@ -312,8 +321,8 @@ final class RemoteConnectionService {
} }
@Override @Override
public final void setConferenceableConnections( public final void setConferenceableConnections(String callId,
String callId, List<String> conferenceableConnectionIds) { List<String> conferenceableConnectionIds, Session.Info sessionInfo) {
List<RemoteConnection> conferenceable = new ArrayList<>(); List<RemoteConnection> conferenceable = new ArrayList<>();
for (String id : conferenceableConnectionIds) { for (String id : conferenceableConnectionIds) {
if (mConnectionById.containsKey(id)) { if (mConnectionById.containsKey(id)) {
@@ -331,7 +340,8 @@ final class RemoteConnectionService {
} }
@Override @Override
public void addExistingConnection(String callId, ParcelableConnection connection) { public void addExistingConnection(String callId, ParcelableConnection connection,
Session.Info sessionInfo) {
// TODO: add contents of this method // TODO: add contents of this method
RemoteConnection remoteConnction = new RemoteConnection(callId, RemoteConnection remoteConnction = new RemoteConnection(callId,
mOutgoingConnectionServiceRpc, connection); mOutgoingConnectionServiceRpc, connection);
@@ -340,7 +350,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void putExtras(String callId, Bundle extras) { public void putExtras(String callId, Bundle extras, Session.Info sessionInfo) {
if (hasConnection(callId)) { if (hasConnection(callId)) {
findConnectionForAction(callId, "putExtras").putExtras(extras); findConnectionForAction(callId, "putExtras").putExtras(extras);
} else { } else {
@@ -349,7 +359,7 @@ final class RemoteConnectionService {
} }
@Override @Override
public void removeExtras(String callId, List<String> keys) { public void removeExtras(String callId, List<String> keys, Session.Info sessionInfo) {
if (hasConnection(callId)) { if (hasConnection(callId)) {
findConnectionForAction(callId, "removeExtra").removeExtras(keys); findConnectionForAction(callId, "removeExtra").removeExtras(keys);
} else { } else {
@@ -358,7 +368,8 @@ final class RemoteConnectionService {
} }
@Override @Override
public void onConnectionEvent(String callId, String event, Bundle extras) { public void onConnectionEvent(String callId, String event, Bundle extras,
Session.Info sessionInfo) {
if (mConnectionById.containsKey(callId)) { if (mConnectionById.containsKey(callId)) {
findConnectionForAction(callId, "onConnectionEvent").onConnectionEvent(event, findConnectionForAction(callId, "onConnectionEvent").onConnectionEvent(event,
extras); extras);

View File

@@ -21,6 +21,7 @@ import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.telecom.ConnectionRequest; import android.telecom.ConnectionRequest;
import android.telecom.DisconnectCause; import android.telecom.DisconnectCause;
import android.telecom.Logging.Session;
import android.telecom.ParcelableConnection; import android.telecom.ParcelableConnection;
import android.telecom.ParcelableConference; import android.telecom.ParcelableConference;
import android.telecom.StatusHints; import android.telecom.StatusHints;
@@ -39,59 +40,68 @@ oneway interface IConnectionServiceAdapter {
void handleCreateConnectionComplete( void handleCreateConnectionComplete(
String callId, String callId,
in ConnectionRequest request, in ConnectionRequest request,
in ParcelableConnection connection); in ParcelableConnection connection,
in Session.Info sessionInfo);
void setActive(String callId); void setActive(String callId, in Session.Info sessionInfo);
void setRinging(String callId); void setRinging(String callId, in Session.Info sessionInfo);
void setDialing(String callId); void setDialing(String callId, in Session.Info sessionInfo);
void setPulling(String callId); void setPulling(String callId, in Session.Info sessionInfo);
void setDisconnected(String callId, in DisconnectCause disconnectCause); void setDisconnected(String callId, in DisconnectCause disconnectCause,
in Session.Info sessionInfo);
void setOnHold(String callId); void setOnHold(String callId, in Session.Info sessionInfo);
void setRingbackRequested(String callId, boolean ringing); void setRingbackRequested(String callId, boolean ringing, in Session.Info sessionInfo);
void setConnectionCapabilities(String callId, int connectionCapabilities); void setConnectionCapabilities(String callId, int connectionCapabilities,
in Session.Info sessionInfo);
void setConnectionProperties(String callId, int connectionProperties); void setConnectionProperties(String callId, int connectionProperties,
in Session.Info sessionInfo);
void setIsConferenced(String callId, String conferenceCallId); void setIsConferenced(String callId, String conferenceCallId, in Session.Info sessionInfo);
void setConferenceMergeFailed(String callId); void setConferenceMergeFailed(String callId, in Session.Info sessionInfo);
void addConferenceCall(String callId, in ParcelableConference conference); void addConferenceCall(String callId, in ParcelableConference conference,
in Session.Info sessionInfo);
void removeCall(String callId); void removeCall(String callId, in Session.Info sessionInfo);
void onPostDialWait(String callId, String remaining); void onPostDialWait(String callId, String remaining, in Session.Info sessionInfo);
void onPostDialChar(String callId, char nextChar); void onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo);
void queryRemoteConnectionServices(RemoteServiceCallback callback); void queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo);
void setVideoProvider(String callId, IVideoProvider videoProvider); void setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo);
void setVideoState(String callId, int videoState); void setVideoState(String callId, int videoState, in Session.Info sessionInfo);
void setIsVoipAudioMode(String callId, boolean isVoip); void setIsVoipAudioMode(String callId, boolean isVoip, in Session.Info sessionInfo);
void setStatusHints(String callId, in StatusHints statusHints); void setStatusHints(String callId, in StatusHints statusHints, in Session.Info sessionInfo);
void setAddress(String callId, in Uri address, int presentation); void setAddress(String callId, in Uri address, int presentation, in Session.Info sessionInfo);
void setCallerDisplayName(String callId, String callerDisplayName, int presentation); void setCallerDisplayName(String callId, String callerDisplayName, int presentation,
in Session.Info sessionInfo);
void setConferenceableConnections(String callId, in List<String> conferenceableCallIds); void setConferenceableConnections(String callId, in List<String> conferenceableCallIds,
in Session.Info sessionInfo);
void addExistingConnection(String callId, in ParcelableConnection connection); void addExistingConnection(String callId, in ParcelableConnection connection,
in Session.Info sessionInfo);
void putExtras(String callId, in Bundle extras); void putExtras(String callId, in Bundle extras, in Session.Info sessionInfo);
void removeExtras(String callId, in List<String> keys); void removeExtras(String callId, in List<String> keys, in Session.Info sessionInfo);
void onConnectionEvent(String callId, String event, in Bundle extras); void onConnectionEvent(String callId, String event, in Bundle extras,
in Session.Info sessionInfo);
} }