Loading src/com/android/server/telecom/ConnectionServiceWrapper.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -77,6 +77,15 @@ public class ConnectionServiceWrapper extends ServiceBinder { logIncoming("handleCreateConnectionComplete %s", callId); logIncoming("handleCreateConnectionComplete %s", callId); ConnectionServiceWrapper.this ConnectionServiceWrapper.this .handleCreateConnectionComplete(callId, request, connection); .handleCreateConnectionComplete(callId, request, connection); if (mServiceInterface != null) { logOutgoing("createConnectionComplete %s", callId); try { mServiceInterface.createConnectionComplete(callId, Log.getExternalSession()); } catch (RemoteException e) { } } } } } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); Loading tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -116,6 +116,10 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> return fakeConnection; return fakeConnection; } } @Override public void onCreateConnectionComplete(Connection connection) { } @Override @Override public void onConference(Connection cxn1, Connection cxn2) { public void onConference(Connection cxn1, Connection cxn2) { if (((FakeConnection) cxn1).getIsConferenceCreated()) { if (((FakeConnection) cxn1).getIsConferenceCreated()) { Loading Loading @@ -239,6 +243,11 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> id, request, isIncoming, isUnknown, null /*Session.Info*/); id, request, isIncoming, isUnknown, null /*Session.Info*/); } } @Override public void createConnectionComplete(String id, Session.Info info) throws RemoteException { mConnectionServiceDelegateAdapter.createConnectionComplete(id, null /*Session.Info*/); } @Override @Override public void createConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount, public void createConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount, String callId, ConnectionRequest request, boolean isIncoming, String callId, ConnectionRequest request, boolean isIncoming, Loading tests/src/com/android/server/telecom/tests/TelecomSystemTest.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -712,6 +712,10 @@ public class TelecomSystemTest extends TelecomTestCase { // Wait for the callback in ConnectionService#onAdapterAttached to execute. // Wait for the callback in ConnectionService#onAdapterAttached to execute. waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); // Ensure callback to CS on successful creation happened. verify(connectionServiceFixture.getTestDouble(), timeout(TEST_TIMEOUT)) .createConnectionComplete(anyString(), any()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureX.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureX.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureY.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureY.mCallById.size()); Loading Loading @@ -759,6 +763,12 @@ public class TelecomSystemTest extends TelecomTestCase { // Wait for the handler to start the CallerInfo lookup // Wait for the handler to start the CallerInfo lookup waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); // Ensure callback to CS on successful creation happened. verify(connectionServiceFixture.getTestDouble(), timeout(TEST_TIMEOUT)) .createConnectionComplete(anyString(), any()); // Process the CallerInfo lookup reply // Process the CallerInfo lookup reply mCallerInfoAsyncQueryFactoryFixture.mRequests.forEach( mCallerInfoAsyncQueryFactoryFixture.mRequests.forEach( CallerInfoAsyncQueryFactoryFixture.Request::reply); CallerInfoAsyncQueryFactoryFixture.Request::reply); Loading Loading
src/com/android/server/telecom/ConnectionServiceWrapper.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -77,6 +77,15 @@ public class ConnectionServiceWrapper extends ServiceBinder { logIncoming("handleCreateConnectionComplete %s", callId); logIncoming("handleCreateConnectionComplete %s", callId); ConnectionServiceWrapper.this ConnectionServiceWrapper.this .handleCreateConnectionComplete(callId, request, connection); .handleCreateConnectionComplete(callId, request, connection); if (mServiceInterface != null) { logOutgoing("createConnectionComplete %s", callId); try { mServiceInterface.createConnectionComplete(callId, Log.getExternalSession()); } catch (RemoteException e) { } } } } } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); Loading
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -116,6 +116,10 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> return fakeConnection; return fakeConnection; } } @Override public void onCreateConnectionComplete(Connection connection) { } @Override @Override public void onConference(Connection cxn1, Connection cxn2) { public void onConference(Connection cxn1, Connection cxn2) { if (((FakeConnection) cxn1).getIsConferenceCreated()) { if (((FakeConnection) cxn1).getIsConferenceCreated()) { Loading Loading @@ -239,6 +243,11 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> id, request, isIncoming, isUnknown, null /*Session.Info*/); id, request, isIncoming, isUnknown, null /*Session.Info*/); } } @Override public void createConnectionComplete(String id, Session.Info info) throws RemoteException { mConnectionServiceDelegateAdapter.createConnectionComplete(id, null /*Session.Info*/); } @Override @Override public void createConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount, public void createConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount, String callId, ConnectionRequest request, boolean isIncoming, String callId, ConnectionRequest request, boolean isIncoming, Loading
tests/src/com/android/server/telecom/tests/TelecomSystemTest.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -712,6 +712,10 @@ public class TelecomSystemTest extends TelecomTestCase { // Wait for the callback in ConnectionService#onAdapterAttached to execute. // Wait for the callback in ConnectionService#onAdapterAttached to execute. waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); // Ensure callback to CS on successful creation happened. verify(connectionServiceFixture.getTestDouble(), timeout(TEST_TIMEOUT)) .createConnectionComplete(anyString(), any()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureX.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureX.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureY.mCallById.size()); assertEquals(startingNumCalls + 1, mInCallServiceFixtureY.mCallById.size()); Loading Loading @@ -759,6 +763,12 @@ public class TelecomSystemTest extends TelecomTestCase { // Wait for the handler to start the CallerInfo lookup // Wait for the handler to start the CallerInfo lookup waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); waitForHandlerAction(new Handler(Looper.getMainLooper()), TEST_TIMEOUT); // Ensure callback to CS on successful creation happened. verify(connectionServiceFixture.getTestDouble(), timeout(TEST_TIMEOUT)) .createConnectionComplete(anyString(), any()); // Process the CallerInfo lookup reply // Process the CallerInfo lookup reply mCallerInfoAsyncQueryFactoryFixture.mRequests.forEach( mCallerInfoAsyncQueryFactoryFixture.mRequests.forEach( CallerInfoAsyncQueryFactoryFixture.Request::reply); CallerInfoAsyncQueryFactoryFixture.Request::reply); Loading