Home
last modified time | relevance | path

Searched refs:callback (Results 1 – 25 of 132) sorted by relevance

123456

/cts/tests/tests/media/src/android/media/cts/
DMediaRouterTest.java349 MediaRouterCallback callback = new MediaRouterCallback(); in testCallback() local
350 MediaRouter.Callback mrc = (MediaRouter.Callback) callback; in testCallback()
351 MediaRouter.SimpleCallback mrsc = (MediaRouter.SimpleCallback) callback; in testCallback()
355 mMediaRouter.addCallback(allRouteTypes, callback); in testCallback()
358 callback.reset(); in testCallback()
361 assertTrue(callback.mOnRouteAddedCalled); in testCallback()
362 assertEquals(userRoute, callback.mAddedRoute); in testCallback()
364 mrc.onRouteAdded(mMediaRouter, callback.mAddedRoute); in testCallback()
365 mrsc.onRouteAdded(mMediaRouter, callback.mAddedRoute); in testCallback()
370 callback.reset(); in testCallback()
[all …]
DMockPlayer.java135 @NonNull PlayerEventCallback callback) { in registerPlayerEventCallback() argument
136 mCallbacks.put(callback, executor); in registerPlayerEventCallback()
140 public void unregisterPlayerEventCallback(@NonNull PlayerEventCallback callback) { in unregisterPlayerEventCallback() argument
141 mCallbacks.remove(callback); in unregisterPlayerEventCallback()
147 final PlayerEventCallback callback = mCallbacks.keyAt(i); in notifyPlaybackState() local
149 executor.execute(() -> callback.onPlayerStateChanged(this, state)); in notifyPlaybackState()
155 final PlayerEventCallback callback = mCallbacks.keyAt(i); in notifyCurrentDataSourceChanged() local
157 executor.execute(() -> callback.onCurrentDataSourceChanged(this, dsd)); in notifyCurrentDataSourceChanged()
163 final PlayerEventCallback callback = mCallbacks.keyAt(i); in notifyMediaPrepared() local
165 executor.execute(() -> callback.onMediaPrepared(this, dsd)); in notifyMediaPrepared()
[all …]
DAudioPlaybackConfigurationTest.java192 MyAudioPlaybackCallback callback = new MyAudioPlaybackCallback(); in doTestCallbackMediaPlayer() local
193 am.registerAudioPlaybackCallback(callback, h /*handler*/); in doTestCallbackMediaPlayer()
203 1/*expected*/, callback.getCbInvocationNumber()); //only one start call in doTestCallbackMediaPlayer()
206 nbActivePlayersBeforeStart + 1/*expected*/, callback.getNbConfigs()); in doTestCallbackMediaPlayer()
207 assertTrue("Active player, attributes not found", hasAttr(callback.getConfigs(), aa)); in doTestCallbackMediaPlayer()
210 callback.reset(); in doTestCallbackMediaPlayer()
215 1/*expected*/, callback.getCbInvocationNumber());//only 1 pause call since reset in doTestCallbackMediaPlayer()
217 nbActivePlayersBeforeStart/*expected*/, callback.getNbConfigs()); in doTestCallbackMediaPlayer()
220 am.unregisterAudioPlaybackCallback(callback); in doTestCallbackMediaPlayer()
222 callback.reset(); in doTestCallbackMediaPlayer()
[all …]
DMidiSoloTest.java100 MidiManager.DeviceCallback callback = new MidiManager.DeviceCallback(); in testMidiManager() local
103 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
104 midiManager.registerDeviceCallback(callback, null); in testMidiManager()
105 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
106 midiManager.registerDeviceCallback(callback, new Handler(Looper.getMainLooper())); in testMidiManager()
107 midiManager.registerDeviceCallback(callback, new Handler(Looper.getMainLooper())); in testMidiManager()
108 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
109 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
110 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
DMediaSession2TestBase.java111 boolean waitForConnect, @Nullable ControllerCallback callback) in createController() argument
113 TestControllerInterface instance = onCreateController(token, callback); in createController()
132 ControllerCallback callback = ((TestControllerInterface) controller).getCallback(); in getWaitForConnectionInterface() local
133 if (!(callback instanceof WaitForConnectionInterface)) { in getWaitForConnectionInterface()
137 return (WaitForConnectionInterface) callback; in getWaitForConnectionInterface()
151 @Nullable ControllerCallback callback) { in onCreateController() argument
152 if (callback == null) { in onCreateController()
153 callback = new ControllerCallback() {}; in onCreateController()
155 return new TestMediaController(mContext, token, new TestControllerCallback(callback)); in onCreateController()
283 @NonNull ControllerCallback callback) { in TestMediaController() argument
[all …]
DMediaSessionManagerTest.java157 MediaSessionCallback callback = new MediaSessionCallback(2, session); in testSetOnMediaKeyListener() local
160 session.setCallback(callback, handler); in testSetOnMediaKeyListener()
181 assertFalse(callback.mCountDownLatch.await(WAIT_MS, TimeUnit.MILLISECONDS)); in testSetOnMediaKeyListener()
182 assertEquals(callback.mKeyEvents.size(), 0); in testSetOnMediaKeyListener()
195 assertTrue(callback.mCountDownLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testSetOnMediaKeyListener()
196 assertEquals(callback.mKeyEvents.size(), 2); in testSetOnMediaKeyListener()
197 assertKeyEventEquals(callback.mKeyEvents.get(0), in testSetOnMediaKeyListener()
199 assertKeyEventEquals(callback.mKeyEvents.get(1), in testSetOnMediaKeyListener()
225 MediaSessionCallback callback = new MediaSessionCallback(5, session); in testRemoteUserInfo() local
228 session.setCallback(callback, handler); in testRemoteUserInfo()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedVectorDrawableTest.java204 final Animatable2Callback callback = new Animatable2Callback(); in testReset() local
208 d1.registerAnimationCallback(callback); in testReset()
212 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testReset()
219 final Animatable2Callback callback = new Animatable2Callback(); in testStop() local
223 d1.registerAnimationCallback(callback); in testStop()
227 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testStop()
233 final Animatable2Callback callback = new Animatable2Callback(); in testAddCallbackBeforeStart() local
239 d1.registerAnimationCallback(callback); in testAddCallbackBeforeStart()
242 callback.waitForStart(); in testAddCallbackBeforeStart()
243 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testAddCallbackBeforeStart()
[all …]
DRotateDrawableTest.java179 Drawable.Callback callback = mock(Drawable.Callback.class); in testInvalidateDrawable() local
181 mRotateDrawable.setCallback(callback); in testInvalidateDrawable()
183 verify(callback, times(1)).invalidateDrawable(any()); in testInvalidateDrawable()
185 reset(callback); in testInvalidateDrawable()
187 verify(callback, times(1)).invalidateDrawable(any()); in testInvalidateDrawable()
189 reset(callback); in testInvalidateDrawable()
192 verify(callback, never()).invalidateDrawable(any()); in testInvalidateDrawable()
197 Drawable.Callback callback = mock(Drawable.Callback.class); in testScheduleDrawable() local
199 mRotateDrawable.setCallback(callback); in testScheduleDrawable()
201 verify(callback, times(1)).scheduleDrawable(any(), any(), anyLong()); in testScheduleDrawable()
[all …]
DAnimatedVectorDrawableParameterizedTest.java121 final Animatable2Callback callback = new Animatable2Callback(); in testAnimationOnLayer() local
136 avd.registerAnimationCallback(callback); in testAnimationOnLayer()
139 callback.waitForStart(); in testAnimationOnLayer()
149 while (!callback.endIsCalled()) { in testAnimationOnLayer()
153 if (callback.endIsCalled()) { in testAnimationOnLayer()
173 if (callback.waitForEnd(50)) { in testAnimationOnLayer()
233 final Animatable2Callback callback = new Animatable2Callback(); in testEmptyAnimatorSet() local
236 d1.registerAnimationCallback(callback); in testEmptyAnimatorSet()
242 d1.registerAnimationCallback(callback); in testEmptyAnimatorSet()
245 Assert.assertTrue(callback.waitForStart()); in testEmptyAnimatorSet()
[all …]
DAnimatable2_AnimationCallbackTest.java32 AnimationCallback callback = new AnimationCallback() {}; in testCallback() local
33 callback.onAnimationStart(null); in testCallback()
34 callback.onAnimationEnd(null); in testCallback()
/cts/tests/tests/location/src/android/location/cts/
DTestLocationManager.java63 public void registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) { in registerGnssMeasurementCallback() argument
66 mLocationManager.registerGnssMeasurementsCallback(callback); in registerGnssMeasurementCallback()
80 public void registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback, in registerGnssMeasurementCallback() argument
84 mLocationManager.registerGnssMeasurementsCallback(callback, handler); in registerGnssMeasurementCallback()
98 public void unregisterGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) { in unregisterGnssMeasurementCallback() argument
100 mLocationManager.unregisterGnssMeasurementsCallback(callback); in unregisterGnssMeasurementCallback()
192 GnssNavigationMessage.Callback callback) { in registerGnssNavigationMessageCallback() argument
194 return mLocationManager.registerGnssNavigationMessageCallback(callback); in registerGnssNavigationMessageCallback()
205 GnssNavigationMessage.Callback callback, Handler handler) { in registerGnssNavigationMessageCallback() argument
207 return mLocationManager.registerGnssNavigationMessageCallback(callback, handler); in registerGnssNavigationMessageCallback()
[all …]
DGnssStatusCallbackTest.java26 GnssStatus.Callback callback = new MockCallback(); in testAllMethodsExist() local
27 callback.onStarted(); in testAllMethodsExist()
28 callback.onFirstFix(10); in testAllMethodsExist()
29 callback.onSatelliteStatusChanged(null); in testAllMethodsExist()
30 callback.onStopped(); in testAllMethodsExist()
DGnssNavigationMessageCallbackTest.java26 GnssNavigationMessage.Callback callback = new MockCallback(); in testAllMethodsExist() local
29 callback.onGnssNavigationMessageReceived(event); in testAllMethodsExist()
30 callback.onStatusChanged(GnssNavigationMessage.Callback.STATUS_READY); in testAllMethodsExist()
DGnssMeasurementsEventCallbackTest.java28 GnssMeasurementsEvent.Callback callback = new MockCallback(); in testAllMethodsExist() local
34 callback.onGnssMeasurementsReceived(event); in testAllMethodsExist()
35 callback.onStatusChanged(GnssMeasurementsEvent.Callback.STATUS_READY); in testAllMethodsExist()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAuthenticationTest.java64 final MyAutofillCallback callback = mActivity.registerCallback(); in datasetAuthTwoFields() local
92 callback.assertUiShownEvent(username); in datasetAuthTwoFields()
98 callback.assertUiHiddenEvent(username); in datasetAuthTwoFields()
99 callback.assertUiShownEvent(password); in datasetAuthTwoFields()
104 callback.assertUiHiddenEvent(password); in datasetAuthTwoFields()
105 callback.assertUiShownEvent(username); in datasetAuthTwoFields()
112 callback.assertUiHiddenEvent(username); in datasetAuthTwoFields()
113 callback.assertUiShownEvent(username); in datasetAuthTwoFields()
118 callback.assertUiHiddenEvent(username); in datasetAuthTwoFields()
119 callback.assertUiShownEvent(password); in datasetAuthTwoFields()
[all …]
DWebViewActivityTest.java115 final MyAutofillCallback callback = mActivity.registerCallback(); in autofillOneDatasetTest() local
128 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView); in autofillOneDatasetTest()
130 callback.assertUiHiddenEvent(myWebView, usernameChildId); in autofillOneDatasetTest()
133 final int passwordChildId = callback.assertUiShownEventForVirtualChild(myWebView); in autofillOneDatasetTest()
140 callback.assertUiHiddenEvent(myWebView, passwordChildId); in autofillOneDatasetTest()
244 final MyAutofillCallback callback = mActivity.registerCallback(); in testAutofillAndSave() local
260 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView); in testAutofillAndSave()
277 callback.assertUiHiddenEvent(myWebView, usernameChildId); in testAutofillAndSave()
336 final MyAutofillCallback callback = mActivity.registerCallback(); in testAutofillAndSave_withExternalViews_loadWebViewFirst() local
353 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView); in testAutofillAndSave_withExternalViews_loadWebViewFirst()
[all …]
DInstrumentedAutoFillService.java179 CancellationSignal cancellationSignal, FillCallback callback) { in onFillRequest() argument
188 cancellationSignal, callback, request.getFlags()); in onFillRequest() local
193 SaveCallback callback) { in onSaveRequest() argument
201 sReplier.onSaveRequest(request.getFillContexts(), request.getClientState(), callback, in onSaveRequest() local
286 final FillCallback callback; field in FillRequest
290 CancellationSignal cancellationSignal, FillCallback callback, int flags) { in FillRequest() argument
294 this.callback = callback; in FillRequest()
314 public final SaveCallback callback; field in SaveRequest
317 private SaveRequest(List<FillContext> contexts, Bundle data, SaveCallback callback, in SaveRequest() argument
326 this.callback = callback; in SaveRequest()
[all …]
/cts/hostsidetests/appsecurity/test-apps/NoRestartApp/src/com/android/cts/norestart/
DNoRestartActivity.java35 final RemoteCallback callback = getIntent().getParcelableExtra("RESPONSE"); in onCreate() local
36 sendResponse(callback); in onCreate()
43 final RemoteCallback callback = intent.getParcelableExtra("RESPONSE"); in onNewIntent() local
44 sendResponse(callback); in onNewIntent()
47 private void sendResponse(RemoteCallback callback) { in sendResponse() argument
51 callback.sendResult(payload); in sendResponse()
/cts/tests/camera/src/android/hardware/camera2/cts/
DIdleUidTest.java121 final CameraDevice.StateCallback callback = mock(CameraDevice.StateCallback.class); in assertCameraAccess() local
125 cameraManager.openCamera(cameraId, callback, handler); in assertCameraAccess()
139 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in assertCameraAccess()
141 verifyNoMoreInteractions(callback); in assertCameraAccess()
144 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in assertCameraAccess()
147 verifyNoMoreInteractions(callback); in assertCameraAccess()
159 final CameraDevice.StateCallback callback = mock(CameraDevice.StateCallback.class); in testCameraAccessBecomingInactiveUidByCamera() local
163 cameraManager.openCamera(cameraId, callback, handler); in testCameraAccessBecomingInactiveUidByCamera()
172 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in testCameraAccessBecomingInactiveUidByCamera()
174 verifyNoMoreInteractions(callback); in testCameraAccessBecomingInactiveUidByCamera()
[all …]
/cts/tests/tests/background/src/android/app/cts/backgroundrestrictions/
DMyReceiver.java34 final Consumer<Intent>callback = sCallback.get(); in onReceive() local
35 if (callback != null) { in onReceive()
36 callback.accept(intent); in onReceive()
40 public static void setCallback(Consumer<Intent> callback) { in setCallback() argument
41 sCallback.set(callback); in setCallback()
/cts/tests/tests/telecom/src/android/telecom/cts/
DRemoteConferenceTest.java210 RemoteConference.Callback callback; in testRemoteConferenceCallbacks_StateChange() local
212 callback = new RemoteConference.Callback() { in testRemoteConferenceCallbacks_StateChange()
219 mRemoteConferenceObject.registerCallback(callback, handler); in testRemoteConferenceCallbacks_StateChange()
225 mRemoteConferenceObject.unregisterCallback(callback); in testRemoteConferenceCallbacks_StateChange()
236 RemoteConference.Callback callback; in testRemoteConferenceCallbacks_Disconnect() local
238 callback = new RemoteConference.Callback() { in testRemoteConferenceCallbacks_Disconnect()
246 mRemoteConferenceObject.registerCallback(callback, handler); in testRemoteConferenceCallbacks_Disconnect()
252 mRemoteConferenceObject.unregisterCallback(callback); in testRemoteConferenceCallbacks_Disconnect()
263 RemoteConference.Callback callback; in testRemoteConferenceCallbacks_ConnectionAdd() local
265 callback = new RemoteConference.Callback() { in testRemoteConferenceCallbacks_ConnectionAdd()
[all …]
DRemoteConnectionTest.java170 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_StateChange() local
172 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_StateChange()
179 mRemoteConnectionObject.registerCallback(callback, handler); in testRemoteConnectionCallbacks_StateChange()
184 mRemoteConnectionObject.unregisterCallback(callback); in testRemoteConnectionCallbacks_StateChange()
196 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_RingbackRequest() local
198 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_RingbackRequest()
205 mRemoteConnectionObject.registerCallback(callback, handler); in testRemoteConnectionCallbacks_RingbackRequest()
210 mRemoteConnectionObject.unregisterCallback(callback); in testRemoteConnectionCallbacks_RingbackRequest()
222 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_ConnectionCapabilities() local
224 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_ConnectionCapabilities()
[all …]
/cts/hostsidetests/devicepolicy/app/AutofillApp/src/com/android/cts/devicepolicy/autofillapp/
DSimpleAutofillService.java31 FillCallback callback) { in onFillRequest() argument
32 callback.onSuccess(null); in onFillRequest()
36 public void onSaveRequest(SaveRequest request, SaveCallback callback) { in onSaveRequest() argument
37 callback.onSuccess(); in onSaveRequest()
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DAdvertiseCallbackTest.java58 void startAdvertise(AdvertiseCallback callback) { in startAdvertise() argument
60 if (mCallbacks.contains(callback)) { in startAdvertise()
61 callback.onStartFailure(AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED); in startAdvertise()
63 callback.onStartSuccess(null); in startAdvertise()
64 mCallbacks.add(callback); in startAdvertise()
DScanCallbackTest.java70 void startScan(ScanSettings settings, ScanCallback callback) { in startScan() argument
72 if (mCallbacks.contains(callback)) { in startScan()
73 callback.onScanFailed(ScanCallback.SCAN_FAILED_ALREADY_STARTED); in startScan()
76 mCallbacks.add(callback); in startScan()
78 callback.onScanResult(0, null); in startScan()
80 callback.onBatchScanResults(null); in startScan()

123456