/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 | 81 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local 82 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection() 83 connection.setMockPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection() 84 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in onCreateOutgoingConnection() 89 connection.createMockVideoProvider(); in onCreateOutgoingConnection() 93 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection() 94 connection.setInitializing(); in onCreateOutgoingConnection() 96 connection.setRttTextStream(request.getRttTextStream()); in onCreateOutgoingConnection() 97 connection.setConnectionProperties(connection.getConnectionProperties() | in onCreateOutgoingConnection() 103 connection.putExtras(testExtra); in onCreateOutgoingConnection() [all …]
|
D | BackgroundCallAudioTest.java | 75 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningAllow() local 84 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningAllow() 91 verifySimulateRingAndUserPickup(call, connection); in testAudioProcessingFromCallScreeningAllow() 101 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningDisallow() local 110 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningDisallow() 129 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningMissed() local 138 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningMissed() 145 verifySimulateRingAndUserMissed(call, connection); in testAudioProcessingFromCallScreeningMissed() 155 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningRemoteHangupDuringRing() local 164 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningRemoteHangupDuringRing() [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 | 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 | SelfManagedConnectionServiceTest.java | 243 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in addAndVerifyIncomingCall() local 248 connection.getOnShowIncomingUiInvokeCounter().waitForCount(1); in addAndVerifyIncomingCall() 249 setActiveAndVerify(connection); in addAndVerifyIncomingCall() 252 assertTrue(connection.getAudioModeIsVoip()); in addAndVerifyIncomingCall() 260 setDisconnectedAndVerify(connection, isLoggedCall(handle), callLogEntryLatch); in addAndVerifyIncomingCall() 274 Connection connection = verifyConnectionForIncomingCall(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() local 275 int capabilities = connection.getConnectionCapabilities(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 277 connection.setConnectionCapabilities(capabilities); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 283 assertConnectionState(connection, Connection.STATE_ACTIVE); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() 379 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in placeAndVerifyOutgoingCall() local [all …]
|
D | ConnectionServiceTest.java | 67 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local 68 connection.setOnHold(); in testAddExistingConnection() 70 connection); in testAddExistingConnection() 90 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountPackageName() local 91 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountPackageName() 98 new PhoneAccountHandle(invalidName, "Test"), connection)); in testAddExistingConnection_invalidPhoneAccountPackageName() 115 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountAccountId() local 116 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountAccountId() 121 new PhoneAccountHandle(validName, "Invalid Account Id"), connection)); in testAddExistingConnection_invalidPhoneAccountAccountId() 135 MockConnection connection = verifyConnectionForOutgoingCall(); in testVoipAudioModePropagation() 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 | 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 | VideoCallTest.java | 66 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMakeTwoWayVideoCall() local 72 connection.setActive(); in testMakeTwoWayVideoCall() 106 Connection connection = verifyConnectionForOutgoingCall(); in testUpgradeToVideo() local 117 assertEquals(VideoProfile.STATE_BIDIRECTIONAL, connection.getVideoState()); in testUpgradeToVideo() 131 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyRequest() local 145 connection.sendMockSessionModifyRequest( in testReceiveSessionModifyRequest() 160 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSendSessionModifyResponse() local 164 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testSendSessionModifyResponse() 185 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyResponse() local 189 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testReceiveSessionModifyResponse() [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 | 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() 230 connection.getHandoverCompleteCounter().waitForCount(1, WAIT_FOR_STATE_CHANGE_TIMEOUT_MS); in completeHandoverAndVerify() 232 connection.getHandoverCompleteCounter().getInvokeCount() >= 1); in completeHandoverAndVerify()
|
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 …]
|
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()
|
/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 | 54 void onShowIncomingCallUi(CtsConnection connection) { 62 void onAnswer(CtsConnection connection, int videoState) { 65 connection.onDisconnect(); 69 void onDisconnect(CtsConnection connection) { 70 super.onDisconnect(connection); 162 CtsConnection connection = ctsConnectionService.waitForAndGetConnection(); in onCreate() 163 if (connection == null) { in onCreate() 168 connection.addListener(mConnectionListener); in onCreate() 172 connection.waitForAudioStateChanged(); in onCreate() 174 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 …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | CommandReceiver.java | 97 ServiceConnection connection = addServiceConnection(targetPackage); in doBindService() local 98 context.bindService(bindIntent, connection, flags | Context.BIND_AUTO_CREATE); in doBindService() 103 ServiceConnection connection = sServiceMap.remove(targetPackage); in doUnbindService() local 104 context.unbindService(connection); in doUnbindService() 157 ServiceConnection connection = new ServiceConnection() { in addServiceConnection() local 166 sServiceMap.put(packageName, connection); in addServiceConnection() 167 return connection; in addServiceConnection()
|