Home
last modified time | relevance | path

Searched refs:conn (Results 1 – 25 of 106) sorted by relevance

12345

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DPersistentConnectionTest.java121 final MyConnection conn = new MyConnection(TAG, context, handler, userId, cn, in testAll() local
127 assertFalse(conn.isBound()); in testAll()
128 assertFalse(conn.isConnected()); in testAll()
129 assertFalse(conn.isRebindScheduled()); in testAll()
130 assertEquals(5000, conn.getNextBackoffMsForTest()); in testAll()
131 assertNull(conn.getServiceBinder()); in testAll()
138 conn.bind(); in testAll()
140 assertTrue(conn.isBound()); in testAll()
141 assertTrue(conn.shouldBeBoundForTest()); in testAll()
142 assertFalse(conn.isConnected()); in testAll()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DVoiceCallSessionStats.java136 for (Connection conn : connections) { in onRilAcceptCall()
137 addCall(conn); in onRilAcceptCall()
142 public synchronized void onRilDial(Connection conn) { in onRilDial() argument
143 addCall(conn); in onRilDial()
150 for (Connection conn : connections) { in onRilCallListChanged()
151 int id = getConnectionId(conn); in onRilCallListChanged()
154 if (conn.getDisconnectCause() == DisconnectCause.NOT_DISCONNECTED) { in onRilCallListChanged()
155 addCall(conn); in onRilCallListChanged()
156 checkCallSetup(conn, mCallProtos.get(id)); in onRilCallListChanged()
163 checkCallSetup(conn, proto); in onRilCallListChanged()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/activity/
DServiceTest.java232 TestConnection conn = new TestConnection(true, false); in bindExpectResult() local
238 getContext().bindService(service, conn, 0); in bindExpectResult()
252 getContext().unbindService(conn); in bindExpectResult()
265 getContext().unbindService(conn); in bindExpectResult()
267 conn = new TestConnection(true, true); in bindExpectResult()
271 conn.setMonitor(true); in bindExpectResult()
273 getContext().bindService(service, conn, 0); in bindExpectResult()
282 getContext().unbindService(conn); in bindExpectResult()
290 conn.setMonitor(false); in bindExpectResult()
295 getContext().unbindService(conn); in bindExpectResult()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DGsmCdmaCall.java73 public void attach(Connection conn, DriverCall dc) { in attach() argument
74 addConnection(conn); in attach()
80 public void attachFake(Connection conn, State state) { in attachFake() argument
81 addConnection(conn); in attachFake()
89 public boolean connectionDisconnected(GsmCdmaConnection conn) { in connectionDisconnected() argument
111 public void detach(GsmCdmaConnection conn) { in detach() argument
112 removeConnection(conn); in detach()
119 /*package*/ boolean update (GsmCdmaConnection conn, DriverCall dc) { in update() argument
150 for (Connection conn : getConnections()) { in onHangupLocal()
151 ((GsmCdmaConnection) conn).onHangupLocal(); in onHangupLocal()
DGsmCdmaCallTracker.java267 for (Connection conn : connCopy) { in fakeHoldForegroundBeforeDial()
268 GsmCdmaConnection gsmCdmaConn = (GsmCdmaConnection) conn; in fakeHoldForegroundBeforeDial()
818 GsmCdmaConnection conn = mConnections[i]; in handlePollCalls() local
833 if (conn != null || dc != null) { in handlePollCalls()
838 conn+", dc=" + dc); in handlePollCalls()
840 if (conn == null && dc != null) { in handlePollCalls()
929 } else if (conn != null && dc == null) { in handlePollCalls()
933 mDroppedDuringPoll.add(conn); in handlePollCalls()
965 } else if (conn != null && dc != null && !conn.compareTo(dc) && isPhoneTypeGsm()) { in handlePollCalls()
969 mDroppedDuringPoll.add(conn); in handlePollCalls()
[all …]
DCall.java170 public void removeConnection(Connection conn) { in removeConnection() argument
172 mConnections.remove(conn); in removeConnection()
181 public void addConnection(Connection conn) { in addConnection() argument
183 mConnections.add(conn); in addConnection()
356 for (Connection conn : getConnections()) {
357 if (conn.getState() == State.DISCONNECTED) {
358 removeConnection(conn);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/imsphone/
DImsPhoneCallTracker.java206 ImsPhoneConnection conn = new ImsPhoneConnection(mPhone, imsCall, in onIncomingCall() local
219 conn.setActiveCallDisconnectedOnAnswer(answeringWillDisconnect); in onIncomingCall()
222 conn.setAllowAddCallDuringVideoCall(mAllowAddCallDuringVideoCall); in onIncomingCall()
223 conn.setAllowHoldingVideoCall(mAllowHoldingVideoCall); in onIncomingCall()
224 addConnection(conn); in onIncomingCall()
226 setVideoCallProvider(conn, imsCall); in onIncomingCall()
230 mPhone.getVoiceCallSessionStats().onImsCallReceived(conn); in onIncomingCall()
233 mPhone.notifyUnknownConnection(conn); in onIncomingCall()
237 conn.update(imsCall, ImsPhoneCall.State.WAITING); in onIncomingCall()
240 mPhone.notifyNewRingingConnection(conn); in onIncomingCall()
[all …]
DImsPhoneCall.java84 for (Connection conn : connections) { in dispose()
85 conn.onDisconnect(DisconnectCause.LOST_SIGNAL); in dispose()
143 for (Connection conn : connections) { in toString()
144 sb.append(conn); in toString()
166 public void attach(Connection conn) { in attach() argument
168 Rlog.v(LOG_TAG, "attach : " + mCallContext + " conn = " + conn); in attach()
171 addConnection(conn); in attach()
177 public void attach(Connection conn, State state) { in attach() argument
182 this.attach(conn); in attach()
187 public void attachFake(Connection conn, State state) { in attachFake() argument
[all …]
/frameworks/base/services/core/java/com/android/server/appbinding/
DAppBindingService.java344 final AppServiceConnection conn = mConnections.get(i); in findConnectionLock() local
345 if ((conn.getUserId() == userId) && (conn.getFinder() == target)) { in findConnectionLock()
346 return conn; in findConnectionLock()
399 final AppServiceConnection conn = in bindServicesLocked() local
402 mConnections.add(conn); in bindServicesLocked()
403 conn.bind(); in bindServicesLocked()
410 final AppServiceConnection conn = mConnections.get(i); in unbindServicesLocked() local
411 if ((conn.getUserId() != userId) in unbindServicesLocked()
412 || (target != null && conn.getFinder() != target)) { in unbindServicesLocked()
417 + " " + conn.getFinder().getAppDescription() in unbindServicesLocked()
[all …]
/frameworks/base/media/jni/
Dandroid_media_MediaHTTPConnection.cpp85 JNIEnv *env, jobject thiz, const sp<JMediaHTTPConnection> &conn) { in setObject() argument
89 if (conn != NULL) { in setObject()
90 conn->incStrong(thiz); in setObject()
95 env->SetLongField(thiz, gFields.context, (jlong)conn.get()); in setObject()
117 sp<JMediaHTTPConnection> conn = new JMediaHTTPConnection(env, thiz); in android_media_MediaHTTPConnection_native_setup() local
119 setObject(env, thiz, conn); in android_media_MediaHTTPConnection_native_setup()
129 sp<JMediaHTTPConnection> conn = getObject(env, thiz); in android_media_MediaHTTPConnection_native_getIMemory() local
131 return javaObjectForIBinder(env, IInterface::asBinder(conn->getIMemory())); in android_media_MediaHTTPConnection_native_getIMemory()
136 sp<JMediaHTTPConnection> conn = getObject(env, thiz); in android_media_MediaHTTPConnection_native_readAt() local
141 jbyteArray byteArrayObj = conn->getByteArrayObj(); in android_media_MediaHTTPConnection_native_readAt()
[all …]
/frameworks/base/tests/testables/src/android/testing/
DTestableContext.java233 public boolean bindService(Intent service, ServiceConnection conn, int flags) { in bindService() argument
234 if (mService != null) mService.getLeakInfo(conn).addAllocation(new Throwable()); in bindService()
235 if (checkMocks(service.getComponent(), conn)) return true; in bindService()
236 return super.bindService(service, conn, flags); in bindService()
243 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, in bindServiceAsUser() argument
245 if (mService != null) mService.getLeakInfo(conn).addAllocation(new Throwable()); in bindServiceAsUser()
246 if (checkMocks(service.getComponent(), conn)) return true; in bindServiceAsUser()
247 return super.bindServiceAsUser(service, conn, flags, handler, user); in bindServiceAsUser()
254 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, in bindServiceAsUser() argument
256 if (mService != null) mService.getLeakInfo(conn).addAllocation(new Throwable()); in bindServiceAsUser()
[all …]
/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/
DAoapInterface.java95 public static int getProtocol(UsbDeviceConnection conn) { in getProtocol() argument
97 int len = conn.controlTransfer( in getProtocol()
106 public static void sendString(UsbDeviceConnection conn, int index, String string) { in sendString() argument
108 int len = conn.controlTransfer( in sendString()
119 public static void sendAoapStart(UsbDeviceConnection conn) { in sendAoapStart() argument
120 int len = conn.controlTransfer( in sendAoapStart()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DSinkActivity.java176 UsbDeviceConnection conn = mUsbManager.openDevice(device); in connect() local
177 if (conn == null) { in connect()
183 if (!conn.claimInterface(iface, true)) { in connect()
192 int protocolVersion = getProtocol(conn); in connect()
226 mAccessoryConnection = conn; in connect()
228 mTransport = new UsbAccessoryBulkTransport(mLogger, conn, bulkIn, bulkOut); in connect()
241 int protocolVersion = getProtocol(conn); in connect()
249 sendString(conn, UsbAccessoryConstants.ACCESSORY_STRING_MANUFACTURER, MANUFACTURER); in connect()
250 sendString(conn, UsbAccessoryConstants.ACCESSORY_STRING_MODEL, MODEL); in connect()
251 sendString(conn, UsbAccessoryConstants.ACCESSORY_STRING_DESCRIPTION, DESCRIPTION); in connect()
[all …]
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/
DBandwidthEnforcementTestService.java98 final HttpURLConnection conn = (HttpURLConnection) new URL("http://www.google.com/") in testUrlConnection() local
101 conn.connect(); in testUrlConnection()
103 new InputStreamReader(conn.getInputStream())); in testUrlConnection()
108 conn.disconnect(); in testUrlConnection()
122 final HttpURLConnection conn = (HttpURLConnection) new URL("http://ipv6.google.com/") in testUrlConnectionv6() local
125 conn.connect(); in testUrlConnectionv6()
127 new InputStreamReader(conn.getInputStream())); in testUrlConnectionv6()
132 conn.disconnect(); in testUrlConnectionv6()
/frameworks/base/tests/FrameworkPerf/src/com/android/frameworkperf/
DFrameworkPerfActivity.java251 void dispatchCurOp(TestConnection conn) { in dispatchCurOp() argument
252 if (mCurConnection != conn) { in dispatchCurOp()
253 Log.w(TAG, "Dispatching on invalid connection: " + conn); in dispatchCurOp()
285 conn.mService.send(msg); in dispatchCurOp()
327 final TestConnection conn = mCurConnection; in disconnect() local
328 if (conn != null) { in disconnect()
332 Log.i(TAG, "Unbinding " + conn, here); in disconnect()
335 unbindService(conn); in disconnect()
338 if (conn.mLinked) { in disconnect()
341 conn.mService.send(msg); in disconnect()
[all …]
/frameworks/base/core/java/android/view/inputmethod/
DInputBinding.java58 public InputBinding(InputConnection conn, IBinder connToken, in InputBinding() argument
60 mConnection = conn; in InputBinding()
73 public InputBinding(InputConnection conn, InputBinding binding) { in InputBinding() argument
74 mConnection = conn; in InputBinding()
/frameworks/av/media/libmediaplayerservice/datasource/
DPlayerServiceDataSourceFactory.cpp48 sp<MediaHTTPConnection> conn = httpService->makeHTTPConnection(); in CreateMediaHTTP() local
49 if (conn == NULL) { in CreateMediaHTTP()
53 return new PlayerServiceMediaHTTP(conn); in CreateMediaHTTP()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDeviceAdminServiceController.java147 final DevicePolicyServiceConnection conn = in startServiceForOwner() local
150 mConnections.put(userId, conn); in startServiceForOwner()
151 conn.bind(); in startServiceForOwner()
174 final DevicePolicyServiceConnection conn = mConnections.get(userId); in disconnectServiceOnUserLocked() local
175 if (conn != null) { in disconnectServiceOnUserLocked()
178 conn.unbind(); in disconnectServiceOnUserLocked()
/frameworks/base/core/tests/coretests/src/android/widget/
DRemoteViewsAdapterTest.java90 assertNotNull(mContext.conn.get()); in onRemoteAdapterConnected_after_metadata_loaded()
198 ServiceConnection conn = mContext.conn.get(); in serviceDisconnected_before_getView() local
200 conn.onServiceDisconnected(null); in serviceDisconnected_before_getView()
243 public final LockedValue<ServiceConnection> conn = new LockedValue<>(); field in RemoteViewsAdapterTest.TestContext
252 public void unbindService(ServiceConnection conn) { in unbindService() argument
266 ServiceConnection conn, Handler handler, int flags) { in getServiceDispatcher() argument
267 this.conn.set(conn); in getServiceDispatcher()
279 ServiceConnection connection = conn.get(); in sendConnect()
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DNetworkActivity.java267 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); in downloadUrl() local
268 conn.setReadTimeout(10000 /* milliseconds */); in downloadUrl()
269 conn.setConnectTimeout(15000 /* milliseconds */); in downloadUrl()
270 conn.setRequestMethod("GET"); in downloadUrl()
271 conn.setDoInput(true); in downloadUrl()
273 conn.connect(); in downloadUrl()
274 InputStream stream = conn.getInputStream(); in downloadUrl()
/frameworks/base/services/core/java/com/android/server/am/
DContentProviderRecord.java84 public ContentProviderHolder newHolder(ContentProviderConnection conn) { in newHolder() argument
88 holder.connection = conn; in newHolder()
96 final ContentProviderConnection conn = connections.get(iconn); in setProcess() local
98 conn.startAssociationIfNeeded(); in setProcess()
100 conn.stopAssociation(); in setProcess()
228 ContentProviderConnection conn = connections.get(i); in dump() local
229 pw.print(prefix); pw.print(" -> "); pw.println(conn.toClientString()); in dump()
230 if (conn.provider != this) { in dump()
232 pw.println(conn.provider); in dump()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ims/
DImsServiceControllerTest.java272 ServiceConnection conn = bindAndConnectService(testFeatures); in testBindServiceAndConnectedDisconnected() local
274 conn.onServiceDisconnected(mTestComponentName); in testBindServiceAndConnectedDisconnected()
296 ServiceConnection conn = bindAndConnectService(testFeatures); in testBindServiceAndConnectedDisconnectedUnbind() local
298 conn.onServiceDisconnected(mTestComponentName); in testBindServiceAndConnectedDisconnectedUnbind()
308 verify(mMockContext).unbindService(eq(conn)); in testBindServiceAndConnectedDisconnectedUnbind()
334 ServiceConnection conn = bindAndConnectService(testFeatures); in testBindServiceBindUnbind() local
338 verify(mMockContext).unbindService(eq(conn)); in testBindServiceBindUnbind()
362 ServiceConnection conn = bindAndConnectService(testFeatures); in testBindServiceAndBinderDied() local
364 conn.onBindingDied(null /*null*/); in testBindServiceAndBinderDied()
366 verify(mMockContext).unbindService(eq(conn)); in testBindServiceAndBinderDied()
[all …]
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/
DActivityTestMain.java231 ServiceConnection conn = new ServiceConnection() { in onCreateOptionsMenu()
241 if (bindService(intent, conn, Context.BIND_AUTO_CREATE)) { in onCreateOptionsMenu()
242 mConnections.add(conn); in onCreateOptionsMenu()
260 ServiceConnection conn = new ServiceConnection() { in onCreateOptionsMenu()
275 Log.i(TAG, "Binding new service: " + conn); in onCreateOptionsMenu()
276 if (bindService(intent, conn, Context.BIND_AUTO_CREATE)) { in onCreateOptionsMenu()
277 mIsolatedConnection = conn; in onCreateOptionsMenu()
333 ServiceConnection conn = new ServiceConnection() { in onCreateOptionsMenu()
343 if (bindServiceAsUser(intent, conn, Context.BIND_AUTO_CREATE, UserHandle.SYSTEM)) { in onCreateOptionsMenu()
344 mConnections.add(conn); in onCreateOptionsMenu()
[all …]
/frameworks/base/test-runner/src/android/test/
DIsolatedContext.java74 public boolean bindService(Intent service, ServiceConnection conn, int flags) { in bindService() argument
80 ServiceConnection conn) { in bindService() argument
86 Executor executor, ServiceConnection conn) { in bindIsolatedService() argument
/frameworks/av/media/libdatasource/
DDataSourceFactory.cpp118 sp<MediaHTTPConnection> conn = httpService->makeHTTPConnection(); in CreateMediaHTTP() local
119 if (conn == NULL) { in CreateMediaHTTP()
123 return new MediaHTTP(conn); in CreateMediaHTTP()

12345