/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 | 56 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local 57 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection() 58 connection.setPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection() 59 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in onCreateOutgoingConnection() 62 connection.createMockVideoProvider(); in onCreateOutgoingConnection() 66 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection() 67 connection.setInitializing(); in onCreateOutgoingConnection() 69 outgoingConnections.add(connection); in onCreateOutgoingConnection() 71 return connection; in onCreateOutgoingConnection() 77 final MockConnection connection = new MockConnection(); in onCreateIncomingConnection() local [all …]
|
D | SelfManagedConnectionServiceTest.java | 209 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testAddSelfManagedIncomingConnection() local 212 connection.getOnShowIncomingUiInvokeCounter().waitForCount(1); in testAddSelfManagedIncomingConnection() 213 setActiveAndVerify(connection); in testAddSelfManagedIncomingConnection() 218 setDisconnectedAndVerify(connection); in testAddSelfManagedIncomingConnection() 236 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testAddSelfManagedOutgoingConnection() local 237 assert(!connection.isIncomingCall()); in testAddSelfManagedOutgoingConnection() 239 assertEquals(connection.getOnShowIncomingUiInvokeCounter().getInvokeCount(), 0); in testAddSelfManagedOutgoingConnection() 241 setActiveAndVerify(connection); in testAddSelfManagedOutgoingConnection() 246 setDisconnectedAndVerify(connection); in testAddSelfManagedOutgoingConnection() 259 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testAudioRoute() 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 | ExtendedInCallServiceTest.java | 71 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMuteAndUnmutePhone() local 79 assertMuteState(connection, false); in testMuteAndUnmutePhone() 84 assertMuteState(connection, true); in testMuteAndUnmutePhone() 88 assertMuteState(connection, false); in testMuteAndUnmutePhone() 98 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSwitchAudioRoutes() local 129 assertAudioRoute(connection, CallAudioState.ROUTE_SPEAKER); in testSwitchAudioRoutes() 135 assertAudioRoute(connection, secondRoute); in testSwitchAudioRoutes() 152 final MockConnection connection = verifyConnectionForOutgoingCall(); in testPlayAndStopDtmfTones() local 159 assertDtmfString(connection, ""); in testPlayAndStopDtmfTones() 162 assertDtmfString(connection, "1"); in testPlayAndStopDtmfTones() [all …]
|
D | CtsSelfManagedConnectionService.java | 54 void onDestroyed(SelfManagedConnection connection) { 55 mConnections.remove(connection); 112 mConnections.forEach(connection -> { in tearDown() 113 connection.setDisconnected(new DisconnectCause(DisconnectCause.LOCAL)); in tearDown() 114 connection.destroy(); in tearDown() 124 SelfManagedConnection connection = new SelfManagedConnection(isIncoming, in createSelfManagedConnection() local 126 connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED); in createSelfManagedConnection() 127 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createSelfManagedConnection() 128 connection.setExtras(request.getExtras()); in createSelfManagedConnection() 133 connection.putExtras(moreExtras); 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 | ConnectionServiceTest.java | 52 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local 53 connection.setOnHold(); in testAddExistingConnection() 54 CtsConnectionService.addExistingConnectionToTelecom(TEST_PHONE_ACCOUNT_HANDLE, connection); in testAddExistingConnection() 70 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountPackageName() local 71 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountPackageName() 77 "Test"), connection); in testAddExistingConnection_invalidPhoneAccountPackageName() 94 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountAccountId() local 95 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountAccountId() 99 "Invalid Account Id"), connection); in testAddExistingConnection_invalidPhoneAccountAccountId()
|
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 | 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 | BaseTelecomTestWithMockServices.java | 362 MockConnection connection = connectionService.outgoingConnections.get(connectionIndex); in verifyConnectionForOutgoingCall() local 363 return connection; in verifyConnectionForOutgoingCall() 383 MockConnection connection = connectionService.incomingConnections.get(connectionIndex); in verifyConnectionForIncomingCall() local 384 setAndVerifyConnectionForIncomingCall(connection); in verifyConnectionForIncomingCall() 385 return connection; in verifyConnectionForIncomingCall() 388 void setAndVerifyConnectionForIncomingCall(MockConnection connection) { in setAndVerifyConnectionForIncomingCall() argument 389 connection.setRinging(); in setAndVerifyConnectionForIncomingCall() 390 assertConnectionState(connection, Connection.STATE_RINGING); in setAndVerifyConnectionForIncomingCall() 396 MockConnection connection = connectionService.outgoingConnections.get(connectionIndex); in setAndVerifyConferenceablesForOutgoingConnection() local 400 if (c != connection) { in setAndVerifyConferenceablesForOutgoingConnection() [all …]
|
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 …]
|
D | CtsConnectionService.java | 121 public void onRemoteExistingConnectionAdded(RemoteConnection connection) { in onRemoteExistingConnectionAdded() argument 124 sConnectionService.onRemoteExistingConnectionAdded(connection); in onRemoteExistingConnectionAdded() 136 PhoneAccountHandle phoneAccountHandle, Connection connection) { in addExistingConnectionToTelecom() argument 138 sTelecomConnectionService.addExistingConnection(phoneAccountHandle, connection); in addExistingConnectionToTelecom()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/ |
D | UsbDeviceTestActivity.java | 164 UsbDeviceConnection connection = mUsbManager.openDevice(device); in onCreate() 166 makeThisDeviceAnAccessory(connection); in onCreate() 168 connection.close(); in onCreate() 215 private void makeThisDeviceAnAccessory(@NonNull UsbDeviceConnection connection) { in makeThisDeviceAnAccessory() argument 216 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MANUFACTURER, in makeThisDeviceAnAccessory() 218 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MODEL, in makeThisDeviceAnAccessory() 220 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_DESCRIPTION, in makeThisDeviceAnAccessory() 222 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_VERSION, "1"); in makeThisDeviceAnAccessory() 223 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_URI, in makeThisDeviceAnAccessory() 225 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/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | DummyConnectionService.java | 37 final DummyConnection connection = new DummyConnection(); in onCreateOutgoingConnection() local 38 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in onCreateOutgoingConnection() 39 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection() 40 hangUpAsync(connection); in onCreateOutgoingConnection() 41 return connection; in onCreateOutgoingConnection() 47 final DummyConnection connection = new DummyConnection(); in onCreateIncomingConnection() local 48 connection.setVideoState(request.getVideoState()); in onCreateIncomingConnection() 51 connection.setAddress(address, TelecomManager.PRESENTATION_ALLOWED); in onCreateIncomingConnection() 52 hangUpAsync(connection); in onCreateIncomingConnection() 53 return connection; in onCreateIncomingConnection() [all …]
|
/cts/common/util/src/com/android/compatibility/common/util/ |
D | MultipartForm.java | 93 HttpURLConnection connection = null; in submitForm() local 96 connection = (HttpURLConnection) url.openConnection(); in submitForm() 97 connection.setInstanceFollowRedirects(false); in submitForm() 98 connection.setRequestMethod("POST"); in submitForm() 99 connection.setDoOutput(true); in submitForm() 100 connection.setRequestProperty("Content-Type", in submitForm() 104 connection.setRequestProperty("Content-Length", Integer.toString(body.length)); in submitForm() 106 OutputStream output = connection.getOutputStream(); in submitForm() 114 InputStream input = connection.getInputStream(); in submitForm() 117 int response = connection.getResponseCode(); in submitForm() [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 | CtsConnection.java | 42 void onDestroyed(CtsConnection connection) { }; in onDestroyed() argument 43 void onDisconnect(CtsConnection connection) { }; in onDisconnect() argument 44 void onHold(CtsConnection connection) { }; in onHold() argument 45 void onUnhold(CtsConnection connection) { }; in onUnhold() argument 46 void onAnswer(CtsConnection connection, int videoState) { }; in onAnswer() argument 47 void onReject(CtsConnection connection) { }; in onReject() argument 48 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/hostsidetests/numberblocking/app/src/com/android/cts/numberblocking/hostside/ |
D | CallBlockingTest.java | 130 final Connection connection = new DummyConnection(); in onCreateIncomingConnection() local 131 connection.setVideoState(request.getVideoState()); in onCreateIncomingConnection() 134 connection.setAddress(address, TelecomManager.PRESENTATION_ALLOWED); in onCreateIncomingConnection() 135 return connection; in onCreateIncomingConnection()
|
/cts/tests/tests/networksecurityconfig/src/android/security/net/config/cts/ |
D | TestUtils.java | 110 HttpURLConnection connection = (HttpURLConnection) url.openConnection(); in assertUrlConnectionFails() local 112 connection.getInputStream(); in assertUrlConnectionFails() 121 HttpURLConnection connection = (HttpURLConnection) url.openConnection(); in assertUrlConnectionSucceeds() local 122 connection.getInputStream(); in assertUrlConnectionSucceeds()
|