Home
last modified time | relevance | path

Searched refs:connection (Results 1 – 25 of 61) sorted by relevance

123

/cts/tests/tests/telecom/src/android/telecom/cts/
DConnectionTest.java45 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 …]
DMockConnectionService.java82 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local
83 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection()
84 connection.setMockPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection()
85 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in onCreateOutgoingConnection()
90 connection.createMockVideoProvider(); in onCreateOutgoingConnection()
94 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection()
95 connection.setInitializing(); in onCreateOutgoingConnection()
97 connection.setRttTextStream(request.getRttTextStream()); in onCreateOutgoingConnection()
98 connection.setConnectionProperties(connection.getConnectionProperties() | in onCreateOutgoingConnection()
104 connection.putExtras(testExtra); in onCreateOutgoingConnection()
[all …]
DBackgroundCallAudioTest.java84 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningAllow() local
93 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningAllow()
100 verifySimulateRingAndUserPickup(call, connection); in testAudioProcessingFromCallScreeningAllow()
110 final MockConnection connection = verifyConnectionForIncomingCall(); in testHoldAfterAudioProcessingFromCallScreening() local
119 assertConnectionState(connection, Connection.STATE_ACTIVE); in testHoldAfterAudioProcessingFromCallScreening()
126 verifySimulateRingAndUserPickup(call, connection); in testHoldAfterAudioProcessingFromCallScreening()
141 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningDisallow() local
150 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningDisallow()
169 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningMissed() local
178 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningMissed()
[all …]
DRttOperationsTest.java63 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 …]
DSelfManagedConnectionServiceTest.java244 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in addAndVerifyIncomingCall() local
249 connection.getOnShowIncomingUiInvokeCounter().waitForCount(1); in addAndVerifyIncomingCall()
250 setActiveAndVerify(connection); in addAndVerifyIncomingCall()
253 assertTrue(connection.getAudioModeIsVoip()); in addAndVerifyIncomingCall()
261 setDisconnectedAndVerify(connection, isLoggedCall(handle), callLogEntryLatch); in addAndVerifyIncomingCall()
275 Connection connection = verifyConnectionForIncomingCall(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() local
276 int capabilities = connection.getConnectionCapabilities(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
278 connection.setConnectionCapabilities(capabilities); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
284 assertConnectionState(connection, Connection.STATE_ACTIVE); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
380 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in placeAndVerifyOutgoingCall() local
[all …]
DExtendedInCallServiceTest.java76 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMuteAndUnmutePhone() local
84 assertMuteState(connection, false); in testMuteAndUnmutePhone()
89 assertMuteState(connection, true); in testMuteAndUnmutePhone()
93 assertMuteState(connection, false); in testMuteAndUnmutePhone()
103 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSwitchAudioRoutes() local
134 assertAudioRoute(connection, CallAudioState.ROUTE_SPEAKER); in testSwitchAudioRoutes()
140 assertAudioRoute(connection, secondRoute); in testSwitchAudioRoutes()
163 final MockConnection connection = verifyConnectionForOutgoingCall(); in testPlayAndStopDtmfTones() local
170 assertDtmfString(connection, ""); in testPlayAndStopDtmfTones()
173 assertDtmfString(connection, "1"); in testPlayAndStopDtmfTones()
[all …]
DWiredHeadsetTest.java44 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 …]
DConnectionServiceTest.java70 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local
71 connection.setOnHold(); in testAddExistingConnection()
73 connection); in testAddExistingConnection()
93 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountPackageName() local
94 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountPackageName()
101 new PhoneAccountHandle(invalidName, "Test"), connection)); in testAddExistingConnection_invalidPhoneAccountPackageName()
118 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountAccountId() local
119 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountAccountId()
124 new PhoneAccountHandle(validName, "Invalid Account Id"), connection)); in testAddExistingConnection_invalidPhoneAccountAccountId()
138 MockConnection connection = verifyConnectionForOutgoingCall(); in testVoipAudioModePropagation() local
[all …]
DCtsSelfManagedConnectionService.java59 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 …]
DVideoCallTest.java66 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 …]
DRemoteConnectionTest.java268 public void onStateChanged(RemoteConnection connection, int state) { in testRemoteConnectionCallbacks_StateChange()
269 super.onStateChanged(connection, state); in testRemoteConnectionCallbacks_StateChange()
270 callbackInvoker.invoke(connection, state); in testRemoteConnectionCallbacks_StateChange()
294 public void onRingbackRequested(RemoteConnection connection, boolean ringback) { in testRemoteConnectionCallbacks_RingbackRequest()
295 super.onRingbackRequested(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
296 callbackInvoker.invoke(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
321 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionCapabilities()
323 super.onConnectionCapabilitiesChanged(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
324 callbackInvoker.invoke(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
350 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionProperties()
[all …]
DBaseRemoteTelecomTest.java123 … 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()
197 void assertRemoteConnectionState(final RemoteConnection connection, final int state) { in assertRemoteConnectionState() argument
[all …]
DHandoverTest.java148 SelfManagedConnection connection = TestUtils.waitForAndGetConnection( in testOutgoingHandoverRequestValid() local
158 completeHandoverAndVerify(call, connection); in testOutgoingHandoverRequestValid()
190 SelfManagedConnection connection = TestUtils.waitForAndGetConnection( in testIncomingHandoverRequestValid() local
202 completeHandoverAndVerify(call, connection); in testIncomingHandoverRequestValid()
214 Connection connection = verifyConnectionForOutgoingCall(); in startSourceCall() local
215 connection.setActive(); in startSourceCall()
225 private void completeHandoverAndVerify(final Call call, SelfManagedConnection connection) { in completeHandoverAndVerify() argument
227 connection.setActive(); in completeHandoverAndVerify()
235 connection.getHandoverCompleteCounter().waitForCount(1, WAIT_FOR_STATE_CHANGE_TIMEOUT_MS); in completeHandoverAndVerify()
237 connection.getHandoverCompleteCounter().getInvokeCount() >= 1); in completeHandoverAndVerify()
DSelfManagedConnectionTest.java170 SelfManagedConnection connection = placeAndVerifySelfManagedCall(); in testBindToSupportNonUiInCallService() local
172 assertTrue(connection.isTracked()); in testBindToSupportNonUiInCallService()
174 connection.disconnectAndDestroy(); in testBindToSupportNonUiInCallService()
194 SelfManagedConnection connection = placeAndVerifySelfManagedCall(); in testBindToSupportDefaultDialerNoCarMode() local
197 connection.waitOnInCallServiceTrackingChanged(); in testBindToSupportDefaultDialerNoCarMode()
198 assertTrue(connection.isTracked()); in testBindToSupportDefaultDialerNoCarMode()
199 assertTrue(connection.isAlternativeUiShowing()); in testBindToSupportDefaultDialerNoCarMode()
201 connection.disconnectAndDestroy(); in testBindToSupportDefaultDialerNoCarMode()
221 SelfManagedConnection connection = placeAndVerifySelfManagedCall(); in testNoBindToUnsupportDefaultDialerNoCarMode() local
224 connection.disconnectAndDestroy(); in testNoBindToUnsupportDefaultDialerNoCarMode()
[all …]
DMissedCallTest.java65 final MockConnection connection = verifyConnectionForIncomingCall(); in testMissedCall_NotifyDialer() local
72 assertConnectionState(connection, Connection.STATE_RINGING); in testMissedCall_NotifyDialer()
74 connection.setDisconnected(new DisconnectCause(DisconnectCause.MISSED)); in testMissedCall_NotifyDialer()
75 connection.destroy(); in testMissedCall_NotifyDialer()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/
DUsbDeviceTestActivity.java164 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, "2"); 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/
DAccessoryTestCompanion.java120 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/
DBaseInputConnectionTest.java64 final BaseInputConnection connection = createBaseInputConnection(); in testDefaultMethods() local
66 assertFalse(connection.beginBatchEdit()); in testDefaultMethods()
67 assertFalse(connection.endBatchEdit()); in testDefaultMethods()
72 assertFalse(connection.commitCompletion(new CompletionInfo(completionId, in testDefaultMethods()
75 assertNull(connection.getExtractedText(new ExtractedTextRequest(), 0)); in testDefaultMethods()
81 assertTrue(connection.performEditorAction(actionCode)); in testDefaultMethods()
82 assertFalse(connection.performContextMenuAction(actionId)); in testDefaultMethods()
83 assertFalse(connection.performPrivateCommand(action, new Bundle())); in testDefaultMethods()
116 final BaseInputConnection connection = createBaseInputConnection(); in testOpTextMethods() local
119 final Editable text = connection.getEditable(); in testOpTextMethods()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DTestConnectionService.java40 final TestConnection connection = new TestConnection(); 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 TestConnection connection = new TestConnection(); 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/
DCtsConnectionService.java41 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 …]
DCtsSelfManagedConnectionService.java21 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()
DSelfManagedIncomingCallTestActivity.java54 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 …]
DCtsConnection.java44 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/
DSelfManagedAwareInCallServiceTest.java131 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testInCallServiceOutgoing() local
132 assertNotNull(connection); in testInCallServiceOutgoing()
140 connection.disconnectAndDestroy(); in testInCallServiceOutgoing()
155 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testInCallServiceIncoming() local
156 assertNotNull(connection); in testInCallServiceIncoming()
164 connection.disconnectAndDestroy(); in testInCallServiceIncoming()
178 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1); in testSelfManagedSignalling() local
179 assertNotNull(connection); in testSelfManagedSignalling()
194 connection.setActive(); in testSelfManagedSignalling()
199 assertTrue(connection.waitOnHold()); in testSelfManagedSignalling()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DTestSipDelegateConnection.java60 public SipDelegateConnection connection; field in TestSipDelegateConnection
87 manager, (m) -> m.destroySipDelegate(connection, reason), in disconnect()
95 manager, (m) -> m.triggerFullNetworkRegistration(connection, sipCode, sipReason), in triggerFullNetworkRegistration()
105 connection.notifyMessageReceiveError(message.getViaBranchParameter(), in onMessageReceived()
108 connection.notifyMessageReceived(message.getViaBranchParameter()); in onMessageReceived()
127 connection = c; in onCreated()
151 connection = null; in onDestroyed()
157 assertNotNull("SipDelegate was null when cleaning up session", connection); in sendCleanupSession()
158 connection.cleanupSession(callId); in sendCleanupSession()
163 assertNotNull("SipDelegate was null when sending message", connection); in sendMessageAndVerifyCompletedSuccessfully()
[all …]

123