Home
last modified time | relevance | path

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

1234

/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.java83 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local
84 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection()
85 connection.setMockPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection()
86 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in onCreateOutgoingConnection()
91 connection.createMockVideoProvider(); in onCreateOutgoingConnection()
95 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection()
96 connection.setInitializing(); in onCreateOutgoingConnection()
98 connection.setRttTextStream(request.getRttTextStream()); in onCreateOutgoingConnection()
99 connection.setConnectionProperties(connection.getConnectionProperties() | in onCreateOutgoingConnection()
110 connection.putExtras(testExtra); in onCreateOutgoingConnection()
[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 …]
DBackgroundCallAudioTest.java85 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningAllow() local
94 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningAllow()
101 verifySimulateRingAndUserPickup(call, connection); in testAudioProcessingFromCallScreeningAllow()
111 final MockConnection connection = verifyConnectionForIncomingCall(); in testHoldAfterAudioProcessingFromCallScreening() local
120 assertConnectionState(connection, Connection.STATE_ACTIVE); in testHoldAfterAudioProcessingFromCallScreening()
127 verifySimulateRingAndUserPickup(call, connection); in testHoldAfterAudioProcessingFromCallScreening()
142 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningDisallow() local
151 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningDisallow()
170 final MockConnection connection = verifyConnectionForIncomingCall(); in testAudioProcessingFromCallScreeningMissed() local
179 assertConnectionState(connection, Connection.STATE_ACTIVE); in testAudioProcessingFromCallScreeningMissed()
[all …]
DWiredHeadsetTest.java54 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingCallShortPress_acceptsCall() local
58 assertConnectionState(connection, Connection.STATE_RINGING); in testIncomingCallShortPress_acceptsCall()
62 assertConnectionState(connection, Connection.STATE_ACTIVE); in testIncomingCallShortPress_acceptsCall()
71 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingCallLongPress_rejectsCall() local
75 assertConnectionState(connection, Connection.STATE_RINGING); in testIncomingCallLongPress_rejectsCall()
79 assertConnectionState(connection, Connection.STATE_DISCONNECTED); in testIncomingCallLongPress_rejectsCall()
88 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCallLongPress_togglesMute() local
97 assertMuteState(connection, true); in testInCallLongPress_togglesMute()
100 assertMuteState(connection, false); in testInCallLongPress_togglesMute()
110 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCallShortPress_hangupCall() local
[all …]
DExtendedInCallServiceTest.java89 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMuteAndUnmutePhone() local
97 assertMuteState(connection, false); in testMuteAndUnmutePhone()
102 assertMuteState(connection, true); in testMuteAndUnmutePhone()
104 assertMuteEndpoint(connection, true); in testMuteAndUnmutePhone()
108 assertMuteState(connection, false); in testMuteAndUnmutePhone()
110 assertMuteEndpoint(connection, false); in testMuteAndUnmutePhone()
120 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSwitchAudioRoutes() local
151 assertAudioRoute(connection, CallAudioState.ROUTE_SPEAKER); in testSwitchAudioRoutes()
157 assertAudioRoute(connection, secondRoute); in testSwitchAudioRoutes()
180 final MockConnection connection = verifyConnectionForOutgoingCall(); in testPlayAndStopDtmfTones() local
[all …]
DSelfManagedConnectionServiceTest.java386 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address); in addAndVerifyIncomingCall() local
389 connection.getOnShowIncomingUiInvokeCounter().waitForCount(1); in addAndVerifyIncomingCall()
390 setActiveAndVerify(connection); in addAndVerifyIncomingCall()
393 assertTrue(connection.getAudioModeIsVoip()); in addAndVerifyIncomingCall()
402 setDisconnectedAndVerify(connection); in addAndVerifyIncomingCall()
422 Connection connection = verifyConnectionForIncomingCall(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() local
423 int capabilities = connection.getConnectionCapabilities(); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
425 connection.setConnectionCapabilities(capabilities); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
431 assertConnectionState(connection, Connection.STATE_ACTIVE); in testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld()
464 SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_2); in testOutgoingCallRejectedByRemoteParty() local
[all …]
DCtsSelfManagedConnectionService.java55 void onDestroyed(SelfManagedConnection connection) {
56 mConnections.remove(connection);
147 mConnections.forEach(connection -> { in tearDown()
148 connection.setDisconnected(new DisconnectCause(DisconnectCause.LOCAL)); in tearDown()
149 connection.destroy(); in tearDown()
159 SelfManagedConnection connection = new SelfManagedConnection(isIncoming, in createSelfManagedConnection() local
161 connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED); in createSelfManagedConnection()
162 connection.setConnectionCapabilities( in createSelfManagedConnection()
164 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createSelfManagedConnection()
165 connection.setExtras(request.getExtras()); in createSelfManagedConnection()
[all …]
DConnectionServiceTest.java86 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local
87 connection.setOnHold(); in testAddExistingConnection()
89 connection); in testAddExistingConnection()
109 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountPackageName() local
110 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountPackageName()
117 new PhoneAccountHandle(invalidName, "Test"), connection)); in testAddExistingConnection_invalidPhoneAccountPackageName()
134 final MockConnection connection = new MockConnection(); in testAddExistingConnection_invalidPhoneAccountAccountId() local
135 connection.setOnHold(); in testAddExistingConnection_invalidPhoneAccountAccountId()
140 new PhoneAccountHandle(validName, "Invalid Account Id"), connection)); in testAddExistingConnection_invalidPhoneAccountAccountId()
154 MockConnection connection = verifyConnectionForOutgoingCall(); in testVoipAudioModePropagation() local
[all …]
DAccessibilitySystemActionTest.java41 final MockConnection connection = verifyConnectionForIncomingCall(); in testIncomingCall_headsetHookAction_acceptsCall() local
44 assertConnectionState(connection, Connection.STATE_RINGING); in testIncomingCall_headsetHookAction_acceptsCall()
49 assertConnectionState(connection, Connection.STATE_ACTIVE); in testIncomingCall_headsetHookAction_acceptsCall()
57 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCall_headsetHookAction_hangupCall() local
60 connection.setActive(); in testInCall_headsetHookAction_hangupCall()
66 assertConnectionState(connection, Connection.STATE_DISCONNECTED); in testInCall_headsetHookAction_hangupCall()
DVideoCallTest.java67 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMakeTwoWayVideoCall() local
73 connection.setActive(); in testMakeTwoWayVideoCall()
107 Connection connection = verifyConnectionForOutgoingCall(); in testUpgradeToVideo() local
118 assertEquals(VideoProfile.STATE_BIDIRECTIONAL, connection.getVideoState()); in testUpgradeToVideo()
132 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyRequest() local
146 connection.sendMockSessionModifyRequest( in testReceiveSessionModifyRequest()
161 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSendSessionModifyResponse() local
165 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testSendSessionModifyResponse()
186 final MockConnection connection = verifyConnectionForOutgoingCall(); in testReceiveSessionModifyResponse() local
190 final MockVideoProvider mockVideoProvider = connection.getMockVideoProvider(); in testReceiveSessionModifyResponse()
[all …]
DRemoteConnectionTest.java319 public void onStateChanged(RemoteConnection connection, int state) { in testRemoteConnectionCallbacks_StateChange()
320 super.onStateChanged(connection, state); in testRemoteConnectionCallbacks_StateChange()
321 callbackInvoker.invoke(connection, state); in testRemoteConnectionCallbacks_StateChange()
345 public void onRingbackRequested(RemoteConnection connection, boolean ringback) { in testRemoteConnectionCallbacks_RingbackRequest()
346 super.onRingbackRequested(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
347 callbackInvoker.invoke(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
372 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionCapabilities()
374 super.onConnectionCapabilitiesChanged(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
375 callbackInvoker.invoke(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
401 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionProperties()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/
DUsbDeviceTestActivity.java167 UsbDeviceConnection connection = mUsbManager.openDevice(device); in onCreate()
169 makeThisDeviceAnAccessory(connection); in onCreate()
171 connection.close(); in onCreate()
217 private void makeThisDeviceAnAccessory(@NonNull UsbDeviceConnection connection) { in makeThisDeviceAnAccessory() argument
218 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MANUFACTURER, in makeThisDeviceAnAccessory()
220 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_MODEL, in makeThisDeviceAnAccessory()
222 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_DESCRIPTION, in makeThisDeviceAnAccessory()
224 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_VERSION, "2"); in makeThisDeviceAnAccessory()
225 AoapInterface.sendString(connection, AoapInterface.ACCESSORY_STRING_URI, in makeThisDeviceAnAccessory()
227 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.java73 final BaseInputConnection connection = InputConnectionTestUtils.createBaseInputConnection(); in testDefaultMethods() local
75 assertFalse(connection.beginBatchEdit()); in testDefaultMethods()
76 assertFalse(connection.endBatchEdit()); in testDefaultMethods()
81 assertFalse(connection.commitCompletion(new CompletionInfo(completionId, in testDefaultMethods()
84 assertNull(connection.getExtractedText(new ExtractedTextRequest(), 0)); in testDefaultMethods()
90 assertTrue(connection.performEditorAction(actionCode)); in testDefaultMethods()
91 assertFalse(connection.performContextMenuAction(actionId)); in testDefaultMethods()
92 assertFalse(connection.performPrivateCommand(action, new Bundle())); in testDefaultMethods()
125 final BaseInputConnection connection = InputConnectionTestUtils.createBaseInputConnection(); in testOpTextMethods() local
128 final Editable text = connection.getEditable(); in testOpTextMethods()
[all …]
/cts/tests/mediapc/src/android/mediapc/cts/
DPost.java83 HttpURLConnection connection = null; in send() local
87 connection = (HttpURLConnection) new URL(mUrl).openConnection(); in send()
89 connection.setRequestMethod("POST"); in send()
90 connection.setDoOutput(mExpectOutput); in send()
91 connection.setDoInput(true); in send()
92 connection.setConnectTimeout(TIMEOUT_MS); in send()
93 connection.setReadTimeout(TIMEOUT_MS); in send()
94 connection.setChunkedStreamingMode(0); in send()
97 connection.setRequestProperty( in send()
103 new BufferedOutputStream(connection.getOutputStream())) { in send()
[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.java44 void onDestroyed(CtsConnection connection) {
46 mConnections.remove(connection);
138 CtsConnection connection = new CtsConnection(getApplicationContext(), isIncoming, in createManagedConnection() local
141 connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED); in createManagedConnection()
143 connection.setAudioModeIsVoip(true); in createManagedConnection()
144 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in createManagedConnection()
146 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createManagedConnection()
147 connection.setExtras(request.getExtras()); in createManagedConnection()
152 connection.putExtras(moreExtras); in createManagedConnection()
153 connection.setVideoState(request.getVideoState()); in createManagedConnection()
[all …]
DCtsSelfManagedConnectionService.java24 void onDestroyed(CtsConnection connection) {
26 mConnections.remove(connection);
97 CtsConnection connection = new CtsConnection(getApplicationContext(), isIncoming, in createConnection() local
99 connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD | in createConnection()
101 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createConnection()
102 connection.setExtras(request.getExtras()); in createConnection()
107 connection.putExtras(moreExtras); in createConnection()
108 connection.setVideoState(request.getVideoState()); in createConnection()
111 mConnections.add(connection); in createConnection()
116 return connection; in createConnection()
/cts/tests/tests/telecom-apps/ManagedConnectionService/src/android/telecom/cts/apps/managedapp/
DManagedAppControl.java117 ManagedConnection connection = (ManagedConnection) waitUntilConnectionIsNonNull(
122 trackConnection(connection, callAttributes, stackTrace);
131 ManagedConnection connection,
136 connection);
137 maybeClearHoldCapabilities(connection, callAttributes);
138 Log.i(TAG, String.format("trackConnection: id=[%s], connection=[%s]", id, connection));
139 mIdToConnection.put(id, connection);
161 ManagedConnection connection = getConnectionOrThrow(id, stackTrace);
165 connection.setCallToDialing();
169 connection.setCallToRinging();
[all …]
DManagedConnectionService.java80 ManagedConnection connection = new ManagedConnection(getApplicationContext(), isOutgoing); in createConnection() local
81 sLastConnection = connection; in createConnection()
84 connection.setDialing(); in createConnection()
86 connection.setRinging(); in createConnection()
89 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createConnection()
90 connection.setConnectionCapabilities( in createConnection()
93 connection.setAudioModeIsVoip(false); in createConnection()
94 return connection; in createConnection()
/cts/tests/tests/telecom-apps/ConnectionServiceVoipAppMain/src/android/telecom/cts/apps/connectionservicevoipappmain/
DVoipConnectionServiceMain.java80 VoipConnection connection = new VoipConnection(getApplicationContext(), isOutgoing); in createConnection() local
81 sLastConnection = connection; in createConnection()
84 connection.setDialing(); in createConnection()
86 connection.setRinging(); in createConnection()
89 connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED); in createConnection()
90 connection.setConnectionCapabilities( in createConnection()
93 connection.setAudioModeIsVoip(true); in createConnection()
94 return connection; in createConnection()
DVoipConnectionServiceControlMain.java145 VoipConnection connection,
150 connection);
151 maybeClearHoldCapabilities(connection, callAttributes);
152 Log.i(mTag, String.format("trackConnection: id=[%s], connection=[%s]", id, connection));
153 mIdToConnection.put(id, connection);
154 connection.setIdAndResources(id,
178 VoipConnection connection = getConnectionOrThrow(id,
183 connection.setCallToDialing();
187 connection.setCallToRinging();
192 connection.setCallToActive();
[all …]
/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/telecom-apps/Utils/src/android/telecom/cts/apps/
DWaitUntil.java102 Connection connection) { in waitUntilIdIsSet() argument
113 return connection.getTelecomCallId() != null in waitUntilIdIsSet()
114 && !(connection.getTelecomCallId().equals("")); in waitUntilIdIsSet()
128 return extractTelecomId(connection); in waitUntilIdIsSet()
135 Connection connection) { in waitUntilCallAudioStateIsSet() argument
146 … return ((ManagedConnection) connection).getCurrentCallEndpointFromCallback() in waitUntilCallAudioStateIsSet()
149 … return ((VoipConnection) connection).getCurrentCallEndpointFromCallback() in waitUntilCallAudioStateIsSet()
170 Connection connection) { in waitUntilAvailableEndpointsIsSet() argument
181 return ((ManagedConnection) connection).getCallEndpoints() in waitUntilAvailableEndpointsIsSet()
184 return ((VoipConnection) connection).getCallEndpoints() in waitUntilAvailableEndpointsIsSet()
[all …]

1234