/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | ConnectionTest.java | 45 Connection connection = createConnection(lock); in testStateCallbacks() local 48 assertEquals(Connection.STATE_NEW, connection.getState()); in testStateCallbacks() 50 connection.setInitializing(); in testStateCallbacks() 52 assertEquals(Connection.STATE_INITIALIZING, connection.getState()); in testStateCallbacks() 54 connection.setInitialized(); in testStateCallbacks() 56 assertEquals(Connection.STATE_NEW, connection.getState()); in testStateCallbacks() 58 connection.setRinging(); in testStateCallbacks() 60 assertEquals(Connection.STATE_RINGING, connection.getState()); in testStateCallbacks() 62 connection.setDialing(); in testStateCallbacks() 64 assertEquals(Connection.STATE_DIALING, connection.getState()); in testStateCallbacks() [all …]
|
D | MockConnectionService.java | 70 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local 71 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection() 72 connection.setPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection() 73 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in onCreateOutgoingConnection() 78 connection.createMockVideoProvider(); in onCreateOutgoingConnection() 82 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection() 83 connection.setInitializing(); in onCreateOutgoingConnection() 85 connection.setRttTextStream(request.getRttTextStream()); in onCreateOutgoingConnection() 86 connection.setConnectionProperties(connection.getConnectionProperties() | in onCreateOutgoingConnection() 92 connection.putExtras(testExtra); in onCreateOutgoingConnection() [all …]
|
D | RttOperationsTest.java | 63 final MockConnection connection = verifyConnectionForOutgoingCall(); in testOutgoingRttCall() local 67 verifyRttEnabled(call, connection); in testOutgoingRttCall() 77 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingRttCall() local 81 verifyRttEnabled(call, connection); in testIncomingRttCall() 90 final MockConnection connection = verifyConnectionForOutgoingCall(); in testLocalRttUpgradeAccepted() local 96 connection.getInvokeCounter(MockConnection.ON_START_RTT); in testLocalRttUpgradeAccepted() 100 connection.setRttTextStream((Connection.RttTextStream) startRttCounter.getArgs(0)[0]); in testLocalRttUpgradeAccepted() 101 connection.setConnectionProperties( in testLocalRttUpgradeAccepted() 102 connection.getConnectionProperties() | Connection.PROPERTY_IS_RTT); in testLocalRttUpgradeAccepted() 103 connection.sendRttInitiationSuccess(); in testLocalRttUpgradeAccepted() [all …]
|
D | ExtendedInCallServiceTest.java | 73 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMuteAndUnmutePhone() local 81 assertMuteState(connection, false); in testMuteAndUnmutePhone() 86 assertMuteState(connection, true); in testMuteAndUnmutePhone() 90 assertMuteState(connection, false); in testMuteAndUnmutePhone() 100 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSwitchAudioRoutes() local 131 assertAudioRoute(connection, CallAudioState.ROUTE_SPEAKER); in testSwitchAudioRoutes() 137 assertAudioRoute(connection, secondRoute); in testSwitchAudioRoutes() 160 final MockConnection connection = verifyConnectionForOutgoingCall(); in testPlayAndStopDtmfTones() local 167 assertDtmfString(connection, ""); in testPlayAndStopDtmfTones() 170 assertDtmfString(connection, "1"); in testPlayAndStopDtmfTones() [all …]
|
D | SelfManagedConnectionServiceTest.java | 242 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in addAndVerifyIncomingCall() local 247 connection.getOnShowIncomingUiInvokeCounter().waitForCount(1); in addAndVerifyIncomingCall() 248 setActiveAndVerify(connection); in addAndVerifyIncomingCall() 251 assertTrue(connection.getAudioModeIsVoip()); in addAndVerifyIncomingCall() 259 setDisconnectedAndVerify(connection, isLoggedCall(handle), callLogEntryLatch); in addAndVerifyIncomingCall() 273 Connection connection = verifyConnectionForIncomingCall(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() local 274 int capabilities = connection.getConnectionCapabilities(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 276 connection.setConnectionCapabilities(capabilities); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 282 assertConnectionState(connection, Connection.STATE_ACTIVE); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 378 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in placeAndVerifyOutgoingCall() local [all …]
|
D | WiredHeadsetTest.java | 44 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingCallShortPress_acceptsCall() local 48 assertConnectionState(connection, Connection.STATE_RINGING); in testIncomingCallShortPress_acceptsCall() 52 assertConnectionState(connection, Connection.STATE_ACTIVE); in testIncomingCallShortPress_acceptsCall() 61 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingCallLongPress_rejectsCall() local 65 assertConnectionState(connection, Connection.STATE_RINGING); in testIncomingCallLongPress_rejectsCall() 69 assertConnectionState(connection, Connection.STATE_DISCONNECTED); in testIncomingCallLongPress_rejectsCall() 78 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCallLongPress_togglesMute() local 87 assertMuteState(connection, true); in testInCallLongPress_togglesMute() 90 assertMuteState(connection, false); in testInCallLongPress_togglesMute() 100 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCallShortPress_hangupCall() local [all …]
|
D | CtsSelfManagedConnectionService.java | 59 void onDestroyed(SelfManagedConnection connection) { 60 mConnections.remove(connection); 152 mConnections.forEach(connection -> { in tearDown() 153 connection.setDisconnected(new DisconnectCause(DisconnectCause.LOCAL)); in tearDown() 154 connection.destroy(); in tearDown() 164 SelfManagedConnection connection = new SelfManagedConnection(isIncoming, in createSelfManagedConnection() local 166 connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED); in createSelfManagedConnection() 167 connection.setConnectionCapabilities( in createSelfManagedConnection() 169 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createSelfManagedConnection() 170 connection.setExtras(request.getExtras()); in createSelfManagedConnection() [all …]
|
D | ConnectionServiceTest.java | 60 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local 61 connection.setOnHold(); in testAddExistingConnection() 62 CtsConnectionService.addExistingConnectionToTelecom(TEST_PHONE_ACCOUNT_HANDLE, connection); in testAddExistingConnection() 78 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountPackageName() local 79 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountPackageName() 85 "Test"), connection); in testAddExistingConnection_invalidPhoneAccountPackageName() 102 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountAccountId() local 103 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountAccountId() 107 "Invalid Account Id"), connection); in testAddExistingConnection_invalidPhoneAccountAccountId() 121 MockConnection connection = verifyConnectionForOutgoingCall(); in testVoipAudioModePropagation() local [all …]
|
D | RemoteConnectionTest.java | 174 public void onStateChanged(RemoteConnection connection, int state) { in testRemoteConnectionCallbacks_StateChange() 175 super.onStateChanged(connection, state); in testRemoteConnectionCallbacks_StateChange() 176 callbackInvoker.invoke(connection, state); in testRemoteConnectionCallbacks_StateChange() 200 public void onRingbackRequested(RemoteConnection connection, boolean ringback) { in testRemoteConnectionCallbacks_RingbackRequest() 201 super.onRingbackRequested(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest() 202 callbackInvoker.invoke(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest() 227 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionCapabilities() 229 super.onConnectionCapabilitiesChanged(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities() 230 callbackInvoker.invoke(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities() 256 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionProperties() [all …]
|
D | BaseRemoteTelecomTest.java | 123 … MockConnection connection = remoteConnectionService.outgoingConnections.get(connectionIndex); in verifyConnectionForOutgoingCallOnRemoteCS() local 124 return connection; in verifyConnectionForOutgoingCallOnRemoteCS() 146 … MockConnection connection = remoteConnectionService.incomingConnections.get(connectionIndex); in verifyConnectionForIncomingCallOnRemoteCS() local 147 setAndVerifyConnectionForIncomingCall(connection); in verifyConnectionForIncomingCallOnRemoteCS() 148 return connection; in verifyConnectionForIncomingCallOnRemoteCS() 158 … MockConnection connection = remoteConnectionService.outgoingConnections.get(connectionIndex); in setAndVerifyConferenceablesForOutgoingConnectionOnRemoteCS() local 162 if (c != connection) { in setAndVerifyConferenceablesForOutgoingConnectionOnRemoteCS() 166 connection.setConferenceableConnections(confConnections); in setAndVerifyConferenceablesForOutgoingConnectionOnRemoteCS() 167 assertEquals(connection.getConferenceables(), confConnections); in setAndVerifyConferenceablesForOutgoingConnectionOnRemoteCS() 185 void assertRemoteConnectionState(final RemoteConnection connection, final int state) { in assertRemoteConnectionState() argument [all …]
|
D | VideoCallTest.java | 66 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMakeTwoWayVideoCall() local 72 connection.setActive(); in testMakeTwoWayVideoCall() 130 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyRequest() local 144 connection.sendMockSessionModifyRequest( in testReceiveSessionModifyRequest() 159 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSendSessionModifyResponse() local 163 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testSendSessionModifyResponse() 184 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyResponse() local 188 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testReceiveSessionModifyResponse() 240 final MockConnection connection = verifyConnectionForOutgoingCall(); in testVideoCallDelayProvider() local 252 connection.createMockVideoProvider(); in testVideoCallDelayProvider() [all …]
|
D | ExternalCallTest.java | 51 Connection connection = super.onCreateOutgoingConnection( in setUp() 54 mConnection = (MockConnection) connection; in setUp() 56 connection.setConnectionCapabilities(CONNECTION_CAPABILITIES); in setUp() 57 connection.setConnectionProperties(CONNECTION_PROPERTIES); in setUp() 60 return connection; in setUp()
|
D | HandoverTest.java | 147 SelfManagedConnection connection = TestUtils.waitForAndGetConnection( in testOutgoingHandoverRequestValid() local 157 completeHandoverAndVerify(call, connection); in testOutgoingHandoverRequestValid() 189 SelfManagedConnection connection = TestUtils.waitForAndGetConnection( in testIncomingHandoverRequestValid() local 201 completeHandoverAndVerify(call, connection); in testIncomingHandoverRequestValid() 220 private void completeHandoverAndVerify(final Call call, SelfManagedConnection connection) { in completeHandoverAndVerify() argument 222 connection.setActive(); in completeHandoverAndVerify() 229 connection.getHandoverCompleteCounter().waitForCount(1, WAIT_FOR_STATE_CHANGE_TIMEOUT_MS); in completeHandoverAndVerify() 230 assertEquals(1, connection.getHandoverCompleteCounter().getInvokeCount()); in completeHandoverAndVerify()
|
D | MissedCallTest.java | 62 final MockConnection connection = verifyConnectionForIncomingCall(); in testMissedCall_NotifyDialer() local 69 assertConnectionState(connection, Connection.STATE_RINGING); in testMissedCall_NotifyDialer() 71 connection.setDisconnected(new DisconnectCause(DisconnectCause.MISSED)); in testMissedCall_NotifyDialer() 72 connection.destroy(); in testMissedCall_NotifyDialer()
|
D | MockConference.java | 66 public void onSeparate(Connection connection) { in onSeparate() argument 67 super.onSeparate(connection); in onSeparate() 68 if (getConnections().contains(connection)) { in onSeparate() 69 removeConnection(connection); in onSeparate() 72 mRemoteConference.separate(((MockConnection)connection).getRemoteConnection()); in onSeparate()
|
D | RemoteConferenceTest.java | 268 RemoteConnection connection) { in testRemoteConferenceCallbacks_ConnectionAdd() 269 super.onConnectionAdded(conference, connection); in testRemoteConferenceCallbacks_ConnectionAdd() 270 callbackInvoker.invoke(conference, connection); in testRemoteConferenceCallbacks_ConnectionAdd() 299 RemoteConnection connection) { in testRemoteConferenceCallbacks_ConnectionRemove() 300 super.onConnectionRemoved(conference, connection); in testRemoteConferenceCallbacks_ConnectionRemove() 301 callbackInvoker.invoke(conference, connection); in testRemoteConferenceCallbacks_ConnectionRemove() 485 MockConnection connection = (MockConnection)super.onCreateOutgoingConnection( in addRemoteConnectionOutgoingCalls() 494 connection.setRemoteConnection(remoteConnection); in addRemoteConnectionOutgoingCalls() 496 int capabilities = connection.getConnectionCapabilities(); in addRemoteConnectionOutgoingCalls() 497 connection.setConnectionCapabilities(capabilities | CONF_CAPABILITIES); in addRemoteConnectionOutgoingCalls() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/ |
D | UsbDeviceTestActivity.java | 160 UsbDeviceConnection connection = mUsbManager.openDevice(device); in onCreate() 162 makeThisDeviceAnAccessory(connection); in onCreate() 164 connection.close(); in onCreate() 211 private void makeThisDeviceAnAccessory(@NonNull UsbDeviceConnection connection) { in makeThisDeviceAnAccessory() argument 212 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MANUFACTURER, in makeThisDeviceAnAccessory() 214 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MODEL, in makeThisDeviceAnAccessory() 216 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_DESCRIPTION, in makeThisDeviceAnAccessory() 218 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_VERSION, "2"); in makeThisDeviceAnAccessory() 219 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_URI, in makeThisDeviceAnAccessory() 221 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_SERIAL, "0"); in makeThisDeviceAnAccessory() [all …]
|
/cts/apps/CtsVerifierUSBCompanion/src/com/android/cts/verifierusbcompanion/ |
D | AccessoryTestCompanion.java | 120 UsbDeviceConnection connection = mUsbManager.openDevice(mDevice); in runTest() local 125 testName = nextTest(connection, in, out, true); in runTest() 133 int numTransferred = connection.bulkTransfer(in, buffer, 32, 0); in runTest() 136 numTransferred = connection.bulkTransfer(out, buffer, 32, 0); in runTest() 145 int numTransferred = connection.bulkTransfer(in, buffer, 32, 0); in runTest() 147 numTransferred = connection.bulkTransfer(in, buffer, 16, 32, 0); in runTest() 150 numTransferred = connection.bulkTransfer(out, buffer, 32, 0); in runTest() 158 int numTransferred = connection.bulkTransfer(in, buffer, 32, 0); in runTest() 161 numTransferred = connection.bulkTransfer(out, buffer, 16, 0); in runTest() 163 numTransferred = connection.bulkTransfer(out, buffer, 16, 16, 0); in runTest() [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | BaseInputConnectionTest.java | 61 final BaseInputConnection connection = createBaseInputConnection(); in testDefaultMethods() local 63 assertFalse(connection.beginBatchEdit()); in testDefaultMethods() 64 assertFalse(connection.endBatchEdit()); in testDefaultMethods() 69 assertFalse(connection.commitCompletion(new CompletionInfo(completionId, in testDefaultMethods() 72 assertNull(connection.getExtractedText(new ExtractedTextRequest(), 0)); in testDefaultMethods() 78 assertTrue(connection.performEditorAction(actionCode)); in testDefaultMethods() 79 assertFalse(connection.performContextMenuAction(actionId)); in testDefaultMethods() 80 assertFalse(connection.performPrivateCommand(action, new Bundle())); in testDefaultMethods() 113 final BaseInputConnection connection = createBaseInputConnection(); in testOpTextMethods() local 116 final Editable text = connection.getEditable(); in testOpTextMethods() [all …]
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | DummyConnectionService.java | 40 final DummyConnection connection = new DummyConnection(); in onCreateOutgoingConnection() local 41 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in onCreateOutgoingConnection() 42 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection() 43 hangUpAsync(connection); in onCreateOutgoingConnection() 44 return connection; in onCreateOutgoingConnection() 50 final DummyConnection connection = new DummyConnection(); in onCreateIncomingConnection() local 51 connection.setVideoState(request.getVideoState()); in onCreateIncomingConnection() 54 connection.setAddress(address, TelecomManager.PRESENTATION_ALLOWED); in onCreateIncomingConnection() 55 hangUpAsync(connection); in onCreateIncomingConnection() 56 return connection; in onCreateIncomingConnection() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/ |
D | CtsConnectionService.java | 41 void onDestroyed(CtsConnection connection) { 43 mConnections.remove(connection); 135 CtsConnection connection = new CtsConnection(getApplicationContext(), isIncoming, in createManagedConnection() local 138 connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED); in createManagedConnection() 140 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in createManagedConnection() 142 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createManagedConnection() 143 connection.setExtras(request.getExtras()); in createManagedConnection() 148 connection.putExtras(moreExtras); in createManagedConnection() 149 connection.setVideoState(request.getVideoState()); in createManagedConnection() 152 mConnections.add(connection); in createManagedConnection() [all …]
|
D | CtsSelfManagedConnectionService.java | 21 void onDestroyed(CtsConnection connection) { 23 mConnections.remove(connection); 94 CtsConnection connection = new CtsConnection(getApplicationContext(), isIncoming, in createConnection() local 96 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in createConnection() 98 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createConnection() 99 connection.setExtras(request.getExtras()); in createConnection() 104 connection.putExtras(moreExtras); in createConnection() 105 connection.setVideoState(request.getVideoState()); in createConnection() 108 mConnections.add(connection); in createConnection() 113 return connection; in createConnection()
|
D | SelfManagedIncomingCallTestActivity.java | 52 void onShowIncomingCallUi(CtsConnection connection) { 59 void onAnswer(CtsConnection connection, int videoState) { 61 connection.onDisconnect(); 65 void onDisconnect(CtsConnection connection) { 66 super.onDisconnect(connection); 151 CtsConnection connection = ctsConnectionService.waitForAndGetConnection(); in onCreate() 152 if (connection == null) { in onCreate() 156 connection.addListener(mConnectionListener); in onCreate() 160 connection.waitForAudioStateChanged(); in onCreate() 162 connection.setActive(); in onCreate() [all …]
|
D | CtsConnection.java | 44 void onDestroyed(CtsConnection connection) { }; in onDestroyed() argument 45 void onDisconnect(CtsConnection connection) { }; in onDisconnect() argument 46 void onHold(CtsConnection connection) { }; in onHold() argument 47 void onUnhold(CtsConnection connection) { }; in onUnhold() argument 48 void onAnswer(CtsConnection connection, int videoState) { }; in onAnswer() argument 49 void onReject(CtsConnection connection) { }; in onReject() argument 50 void onShowIncomingCallUi(CtsConnection connection) { }; in onShowIncomingCallUi() argument
|
/cts/tests/tests/telecom3/src/android/telecom/cts/ |
D | SelfManagedAwareInCallServiceTest.java | 122 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testInCallServiceOutgoing() local 123 assertNotNull(connection); in testInCallServiceOutgoing() 131 connection.disconnectAndDestroy(); in testInCallServiceOutgoing() 146 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testInCallServiceIncoming() local 147 assertNotNull(connection); in testInCallServiceIncoming() 155 connection.disconnectAndDestroy(); in testInCallServiceIncoming() 169 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testSelfManagedSignalling() local 170 assertNotNull(connection); in testSelfManagedSignalling() 185 connection.setActive(); in testSelfManagedSignalling() 190 assertTrue(connection.waitOnHold()); in testSelfManagedSignalling() [all …]
|