Home
last modified time | relevance | path

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

12

/cts/tests/tests/telecom/src/android/telecom/cts/
DConnectionTest.java43 Connection connection = createConnection(lock); in testStateCallbacks() local
46 assertEquals(Connection.STATE_NEW, connection.getState()); in testStateCallbacks()
48 connection.setInitializing(); in testStateCallbacks()
50 assertEquals(Connection.STATE_INITIALIZING, connection.getState()); in testStateCallbacks()
52 connection.setInitialized(); in testStateCallbacks()
54 assertEquals(Connection.STATE_NEW, connection.getState()); in testStateCallbacks()
56 connection.setRinging(); in testStateCallbacks()
58 assertEquals(Connection.STATE_RINGING, connection.getState()); in testStateCallbacks()
60 connection.setDialing(); in testStateCallbacks()
62 assertEquals(Connection.STATE_DIALING, connection.getState()); in testStateCallbacks()
[all …]
DMockConnectionService.java56 final MockConnection connection = new MockConnection(); in onCreateOutgoingConnection() local
57 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateOutgoingConnection()
58 connection.setPhoneAccountHandle(connectionManagerPhoneAccount); in onCreateOutgoingConnection()
60 connection.createMockVideoProvider(); in onCreateOutgoingConnection()
64 connection.setVideoState(request.getVideoState()); in onCreateOutgoingConnection()
65 connection.setInitializing(); in onCreateOutgoingConnection()
67 outgoingConnections.add(connection); in onCreateOutgoingConnection()
69 return connection; in onCreateOutgoingConnection()
75 final MockConnection connection = new MockConnection(); in onCreateIncomingConnection() local
76 connection.setAddress(request.getAddress(), CONNECTION_PRESENTATION); in onCreateIncomingConnection()
[all …]
DExtendedInCallServiceTest.java70 final MockConnection connection = verifyConnectionForOutgoingCall(); in testMuteAndUnmutePhone() local
78 assertMuteState(connection, false); in testMuteAndUnmutePhone()
83 assertMuteState(connection, true); in testMuteAndUnmutePhone()
87 assertMuteState(connection, false); in testMuteAndUnmutePhone()
97 final MockConnection connection = verifyConnectionForOutgoingCall(); in testSwitchAudioRoutes() local
109 int availableRoutes = connection.getCallAudioState().getSupportedRouteMask(); in testSwitchAudioRoutes()
125 assertAudioRoute(connection, CallAudioState.ROUTE_SPEAKER); in testSwitchAudioRoutes()
131 assertAudioRoute(connection, secondRoute); in testSwitchAudioRoutes()
148 final MockConnection connection = verifyConnectionForOutgoingCall(); in testPlayAndStopDtmfTones() local
155 assertDtmfString(connection, ""); 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 testInCallShortPress_togglesMute() local
87 assertMuteState(connection, true); in testInCallShortPress_togglesMute()
90 assertMuteState(connection, false); in testInCallShortPress_togglesMute()
100 final MockConnection connection = verifyConnectionForOutgoingCall(); in testInCallLongPress_hangupCall() local
[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()
185 void assertRemoteConnectionState(final RemoteConnection connection, final int state) { in assertRemoteConnectionState() argument
[all …]
DRemoteConnectionTest.java175 public void onStateChanged(RemoteConnection connection, int state) { in testRemoteConnectionCallbacks_StateChange()
176 super.onStateChanged(connection, state); in testRemoteConnectionCallbacks_StateChange()
177 callbackInvoker.invoke(connection, state); in testRemoteConnectionCallbacks_StateChange()
201 public void onRingbackRequested(RemoteConnection connection, boolean ringback) { in testRemoteConnectionCallbacks_RingbackRequest()
202 super.onRingbackRequested(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
203 callbackInvoker.invoke(connection, ringback); in testRemoteConnectionCallbacks_RingbackRequest()
228 RemoteConnection connection, in testRemoteConnectionCallbacks_ConnectionCapabilities()
230 super.onConnectionCapabilitiesChanged(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
231 callbackInvoker.invoke(connection, connectionCapabilities); in testRemoteConnectionCallbacks_ConnectionCapabilities()
256 public void onPostDialWait(RemoteConnection connection, in testRemoteConnectionCallbacks_PostDialWait()
[all …]
DVideoCallTest.java66 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 …]
DMissedCallTest.java62 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()
DMockConference.java66 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()
DBaseTelecomTestWithMockServices.java380 MockConnection connection = connectionService.outgoingConnections.get(connectionIndex); in verifyConnectionForOutgoingCall() local
381 return connection; in verifyConnectionForOutgoingCall()
401 MockConnection connection = connectionService.incomingConnections.get(connectionIndex); in verifyConnectionForIncomingCall() local
402 setAndVerifyConnectionForIncomingCall(connection); in verifyConnectionForIncomingCall()
403 return connection; in verifyConnectionForIncomingCall()
406 void setAndVerifyConnectionForIncomingCall(MockConnection connection) { in setAndVerifyConnectionForIncomingCall() argument
407 connection.setRinging(); in setAndVerifyConnectionForIncomingCall()
408 assertConnectionState(connection, Connection.STATE_RINGING); in setAndVerifyConnectionForIncomingCall()
414 MockConnection connection = connectionService.outgoingConnections.get(connectionIndex); in setAndVerifyConferenceablesForOutgoingConnection() local
418 if (c != connection) { in setAndVerifyConferenceablesForOutgoingConnection()
[all …]
DCtsConnectionService.java133 public void onRemoteExistingConnectionAdded(RemoteConnection connection) { in onRemoteExistingConnectionAdded() argument
136 sConnectionService.onRemoteExistingConnectionAdded(connection); in onRemoteExistingConnectionAdded()
138 mMockConnectionService.onRemoteExistingConnectionAdded(connection); in onRemoteExistingConnectionAdded()
150 PhoneAccountHandle phoneAccountHandle, Connection connection) { in addExistingConnectionToTelecom() argument
152 sTelecomConnectionService.addExistingConnection(phoneAccountHandle, connection); in addExistingConnectionToTelecom()
DRemoteConferenceTest.java268 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()
454 MockConnection connection = (MockConnection)super.onCreateOutgoingConnection( in addRemoteConnectionOutgoingCalls()
463 connection.setRemoteConnection(remoteConnection); in addRemoteConnectionOutgoingCalls()
465 int capabilities = connection.getConnectionCapabilities(); in addRemoteConnectionOutgoingCalls()
466 connection.setConnectionCapabilities(capabilities | CONF_CAPABILITIES); in addRemoteConnectionOutgoingCalls()
[all …]
DConnectionServiceTest.java52 final MockConnection connection = new MockConnection(); in testAddExistingConnection() local
53 connection.setOnHold(); in testAddExistingConnection()
54 CtsConnectionService.addExistingConnectionToTelecom(TEST_PHONE_ACCOUNT_HANDLE, connection); in testAddExistingConnection()
DCallDetailsTest.java90 Connection connection = super.onCreateOutgoingConnection( in setUp()
93 mConnection = (MockConnection) connection; in setUp()
95 connection.setConnectionCapabilities(CONNECTION_CAPABILITIES); in setUp()
96 connection.setCallerDisplayName( in setUp()
99 connection.setExtras(mExtras); in setUp()
106 connection.setStatusHints(mStatusHints); in setUp()
108 return connection; in setUp()
DConferenceTest.java294 Connection connection = super.onCreateOutgoingConnection( in addOutgoingCalls()
298 int capabilities = connection.getConnectionCapabilities(); in addOutgoingCalls()
299 connection.setConnectionCapabilities(capabilities | CONF_CAPABILITIES); in addOutgoingCalls()
300 return connection; in addOutgoingCalls()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DDummyConnectionService.java37 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/
DMultipartForm.java93 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/tools/tradefed-host/src/com/android/cts/tradefed/result/
DMultipartForm.java72 HttpURLConnection connection = null; in submitForm() local
75 connection = (HttpURLConnection) url.openConnection(); in submitForm()
76 connection.setInstanceFollowRedirects(false); in submitForm()
77 connection.setRequestMethod("POST"); in submitForm()
78 connection.setDoOutput(true); in submitForm()
79 connection.setRequestProperty("Content-Type", in submitForm()
83 connection.setRequestProperty("Content-Length", Integer.toString(body.length)); in submitForm()
85 OutputStream output = connection.getOutputStream(); in submitForm()
93 InputStream input = connection.getInputStream(); in submitForm()
96 if (connection.getResponseCode() == 302) { in submitForm()
[all …]
/cts/hostsidetests/numberblocking/app/src/com/android/cts/numberblocking/hostside/
DCallBlockingTest.java130 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/
DTestUtils.java110 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()
/cts/tests/tests/net/src/android/net/wifi/cts/
DWifiManagerTest.java501 HttpURLConnection connection = null; in testWifiWatchdog() local
504 connection = (HttpURLConnection) url.openConnection(); in testWifiWatchdog()
505 connection.setInstanceFollowRedirects(false); in testWifiWatchdog()
506 connection.setConnectTimeout(TIMEOUT_MSEC); in testWifiWatchdog()
507 connection.setReadTimeout(TIMEOUT_MSEC); in testWifiWatchdog()
508 connection.setUseCaches(false); in testWifiWatchdog()
509 connection.getInputStream(); in testWifiWatchdog()
513 if (connection != null) connection.disconnect(); in testWifiWatchdog()
/cts/libs/testserver/src/android/webkit/cts/
DTestWebServer.java139 URLConnection connection = openConnection(url); in shutdown() local
140 connection.connect(); in shutdown()
143 InputStream is = connection.getInputStream(); in shutdown()
329 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in openConnection() local
330 connection.setHostnameVerifier(new TestHostnameVerifier()); in openConnection()
335 connection.setSSLSocketFactory(context.getSocketFactory()); in openConnection()
337 return connection; in openConnection()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/
DMtpHostTestActivity.java258 final UsbDeviceConnection connection = mUsbManager.openDevice(mUsbDevice);
259 assertNotNull(connection);
263 connection.claimInterface(mUsbDevice.getInterface(i), true);
264 connection.releaseInterface(mUsbDevice.getInterface(i));
267 assertTrue(mMtpDevice.open(connection));
/cts/tests/tests/view/src/android/view/inputmethod/cts/
DInputMethodManagerTest.java86 BaseInputConnection connection = new BaseInputConnection(view, false); in testInputMethodManager() local
102 connection.reportFullscreenMode(true); in testInputMethodManager()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java345 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); in makeHttpsRequest() local
346 connection.setSSLSocketFactory(clientContext.getSocketFactory()); in makeHttpsRequest()
347 if (connection.getResponseCode() != 200) { in makeHttpsRequest()
348 log("Connection failed. Response code: " + connection.getResponseCode()); in makeHttpsRequest()

12