Home
last modified time | relevance | path

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

1234567

/cts/tests/tests/media/src/android/media/cts/
DMediaRouterTest.java350 MediaRouterCallback callback = new MediaRouterCallback(); in testCallback() local
351 MediaRouter.Callback mrc = (MediaRouter.Callback) callback; in testCallback()
352 MediaRouter.SimpleCallback mrsc = (MediaRouter.SimpleCallback) callback; in testCallback()
356 mMediaRouter.addCallback(allRouteTypes, callback); in testCallback()
359 callback.reset(); in testCallback()
362 assertTrue(callback.mOnRouteAddedCalled); in testCallback()
363 assertEquals(userRoute, callback.mAddedRoute); in testCallback()
365 mrc.onRouteAdded(mMediaRouter, callback.mAddedRoute); in testCallback()
366 mrsc.onRouteAdded(mMediaRouter, callback.mAddedRoute); in testCallback()
371 callback.reset(); in testCallback()
[all …]
DAudioPlaybackConfigurationTest.java199 MyAudioPlaybackCallback callback = new MyAudioPlaybackCallback(); in doTestCallbackMediaPlayer() local
200 am.registerAudioPlaybackCallback(callback, h /*handler*/); in doTestCallbackMediaPlayer()
210 1/*expected*/, callback.getCbInvocationNumber()); //only one start call in doTestCallbackMediaPlayer()
213 nbActivePlayersBeforeStart + 1/*expected*/, callback.getNbConfigs()); in doTestCallbackMediaPlayer()
214 assertTrue("Active player, attributes not found", hasAttr(callback.getConfigs(), aa)); in doTestCallbackMediaPlayer()
217 callback.reset(); in doTestCallbackMediaPlayer()
222 1/*expected*/, callback.getCbInvocationNumber());//only 1 pause call since reset in doTestCallbackMediaPlayer()
224 nbActivePlayersBeforeStart/*expected*/, callback.getNbConfigs()); in doTestCallbackMediaPlayer()
227 am.unregisterAudioPlaybackCallback(callback); in doTestCallbackMediaPlayer()
229 callback.reset(); in doTestCallbackMediaPlayer()
[all …]
DAudioRecordingConfigurationTest.java173 MyAudioRecordingCallback callback = new MyAudioRecordingCallback( in doCallbackTest() local
175 am.registerAudioRecordingCallback(callback, h /*handler*/); in doCallbackTest()
180 callback.await(TEST_TIMING_TOLERANCE_MS); in doCallbackTest()
182 assertTrue("AudioRecordingCallback not called after start", callback.mCalled); in doCallbackTest()
189 testDevice, callback.mConfigs); in doCallbackTest()
194 verifyPrivilegedInfoIsSafe(callback.mConfigs.get(0)); in doCallbackTest()
197 callback.reset(); in doCallbackTest()
199 callback.await(TEST_TIMING_TOLERANCE_MS); in doCallbackTest()
200 assertTrue("AudioRecordingCallback not called after stop", callback.mCalled); in doCallbackTest()
201 assertEquals("Should not have found record configurations", callback.mConfigs.size(), in doCallbackTest()
[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()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedVectorDrawableTest.java216 final Animatable2Callback callback = new Animatable2Callback(); in testReset() local
220 d1.registerAnimationCallback(callback); in testReset()
224 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testReset()
231 final Animatable2Callback callback = new Animatable2Callback(); in testStop() local
235 d1.registerAnimationCallback(callback); in testStop()
239 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testStop()
246 final Animatable2Callback callback = new Animatable2Callback(); in testAddCallbackBeforeStart() local
252 d1.registerAnimationCallback(callback); in testAddCallbackBeforeStart()
255 callback.waitForStart(); in testAddCallbackBeforeStart()
256 waitForAVDStop(callback, MAX_TIMEOUT_MS); in testAddCallbackBeforeStart()
[all …]
DRotateDrawableTest.java180 Drawable.Callback callback = mock(Drawable.Callback.class); in testInvalidateDrawable() local
182 mRotateDrawable.setCallback(callback); in testInvalidateDrawable()
184 verify(callback, times(1)).invalidateDrawable(any()); in testInvalidateDrawable()
186 reset(callback); in testInvalidateDrawable()
188 verify(callback, times(1)).invalidateDrawable(any()); in testInvalidateDrawable()
190 reset(callback); in testInvalidateDrawable()
193 verify(callback, never()).invalidateDrawable(any()); in testInvalidateDrawable()
198 Drawable.Callback callback = mock(Drawable.Callback.class); in testScheduleDrawable() local
200 mRotateDrawable.setCallback(callback); in testScheduleDrawable()
202 verify(callback, times(1)).scheduleDrawable(any(), any(), anyLong()); in testScheduleDrawable()
[all …]
DColorStateListDrawableTest.java176 final TestCallback callback = new TestCallback(); in testInvalidationCallbackProxy() local
177 mDrawable.setCallback(callback); in testInvalidationCallbackProxy()
179 callback.mInvalidatedDrawable = null; in testInvalidationCallbackProxy()
181 assertEquals(mDrawable, callback.mInvalidatedDrawable); in testInvalidationCallbackProxy()
183 callback.mInvalidatedDrawable = null; in testInvalidationCallbackProxy()
185 assertEquals(mDrawable, callback.mInvalidatedDrawable); in testInvalidationCallbackProxy()
192 final TestCallback callback = new TestCallback(); in testScheduleCallbackProxy() local
193 mDrawable.setCallback(callback); in testScheduleCallbackProxy()
196 assertEquals(mDrawable, callback.mScheduledDrawable); in testScheduleCallbackProxy()
197 assertEquals(runnable, callback.mScheduledRunnable); in testScheduleCallbackProxy()
[all …]
DAnimatedVectorDrawableParameterizedTest.java122 final Animatable2Callback callback = new Animatable2Callback(); in testAnimationOnLayer() local
137 avd.registerAnimationCallback(callback); in testAnimationOnLayer()
140 callback.waitForStart(); in testAnimationOnLayer()
150 while (!callback.endIsCalled()) { in testAnimationOnLayer()
154 if (callback.endIsCalled()) { in testAnimationOnLayer()
174 if (callback.waitForEnd(50)) { in testAnimationOnLayer()
234 final Animatable2Callback callback = new Animatable2Callback(); in testEmptyAnimatorSet() local
237 d1.registerAnimationCallback(callback); in testEmptyAnimatorSet()
243 d1.registerAnimationCallback(callback); in testEmptyAnimatorSet()
246 Assert.assertTrue(callback.waitForStart()); in testEmptyAnimatorSet()
[all …]
/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.java111 final MyAutofillCallback callback = mActivity.registerCallback();
124 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView);
126 callback.assertUiHiddenEvent(myWebView, usernameChildId);
129 final int passwordChildId = callback.assertUiShownEventForVirtualChild(myWebView);
136 callback.assertUiHiddenEvent(myWebView, passwordChildId);
232 final MyAutofillCallback callback = mActivity.registerCallback();
248 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView);
265 callback.assertUiHiddenEvent(myWebView, usernameChildId);
316 final MyAutofillCallback callback = mActivity.registerCallback();
333 final int usernameChildId = callback.assertUiShownEventForVirtualChild(myWebView);
[all …]
DInstrumentedAutoFillService.java214 CancellationSignal cancellationSignal, FillCallback callback) { in onFillRequest() argument
237 cancellationSignal, callback, request.getFlags())); in onFillRequest() local
242 SaveCallback callback) { in onSaveRequest() argument
248 mHandler.post(()->handleSaveRequest(request, callback)); in onSaveRequest()
252 SaveCallback callback) { in handleSaveRequest() argument
268 request.getClientState(), callback, in handleSaveRequest() local
363 public final FillCallback callback; field in FillRequest
367 CancellationSignal cancellationSignal, FillCallback callback, int flags) { in FillRequest() argument
371 this.callback = callback; in FillRequest()
392 public final SaveCallback callback; field in SaveRequest
[all …]
DFieldsClassificationTest.java184 final MyAutofillCallback callback = mActivity.registerCallback(); in testMiss_exactMatchAlgorithm() local
195 callback.assertUiUnavailableEvent(field); in testMiss_exactMatchAlgorithm()
218 final MyAutofillCallback callback = mActivity.registerCallback(); in testHit_exactMatchLast4Algorithm() local
232 callback.assertUiUnavailableEvent(field); in testHit_exactMatchLast4Algorithm()
256 final MyAutofillCallback callback = mActivity.registerCallback(); in testHit_useDefaultAlgorithm() local
270 callback.assertUiUnavailableEvent(field); in testHit_useDefaultAlgorithm()
293 final MyAutofillCallback callback = mActivity.registerCallback(); in simpleHitTest() local
307 callback.assertUiUnavailableEvent(field); in simpleHitTest()
330 final MyAutofillCallback callback = mActivity.registerCallback(); in testHit_sameValueForMultipleCategories() local
344 callback.assertUiUnavailableEvent(field); in testHit_sameValueForMultipleCategories()
[all …]
/cts/tests/tests/net/src/android/net/cts/
DDnsResolverTest.java324 final VerifyCancelCallback callback = new VerifyCancelCallback(msg); in doTestRawQuery() local
326 executor, null, callback); in doTestRawQuery()
329 callback.waitForAnswer()); in doTestRawQuery()
330 callback.assertHasAnswer(); in doTestRawQuery()
351 final VerifyCancelCallback callback = new VerifyCancelCallback(msg); in doTestRawQueryBlob() local
352 mDns.rawQuery(network, blob, FLAG_NO_CACHE_LOOKUP, executor, null, callback); in doTestRawQueryBlob()
355 callback.waitForAnswer()); in doTestRawQueryBlob()
356 callback.assertHasAnswer(); in doTestRawQueryBlob()
364 final VerifyCancelCallback callback = new VerifyCancelCallback(msg); in doTestRawQueryRoot() local
366 executor, null, callback); in doTestRawQueryRoot()
[all …]
DNetworkAgentTest.kt290 private fun requestNetwork(request: NetworkRequest, callback: TestableNetworkCallback) { in requestNetwork()
291 mCM.requestNetwork(request, callback) in requestNetwork()
292 callbacksToCleanUp.add(callback) in requestNetwork()
297 callback: TestableNetworkCallback in registerNetworkCallback()
299 mCM.registerNetworkCallback(request, callback) in registerNetworkCallback()
300 callbacksToCleanUp.add(callback) in registerNetworkCallback()
330 val callback = TestableNetworkCallback(timeoutMs = DEFAULT_TIMEOUT_MS) in createConnectedNetworkAgent() constant
331 requestNetwork(request, callback) in createConnectedNetworkAgent()
335 return agent to callback in createConnectedNetworkAgent()
344 val (agent, callback) = createConnectedNetworkAgent() in testConnectAndUnregister() constant
[all …]
/cts/tests/tests/voiceinteraction/testapp/src/android/voiceinteraction/testapp/
DDirectActionsActivity.java83 @NonNull Consumer<List<DirectAction>> callback) { in onGetDirectActions() argument
86 callback.accept(Collections.emptyList()); in onGetDirectActions()
96 callback.accept(actions); in onGetDirectActions()
101 CancellationSignal cancellationSignal, Consumer<Bundle> callback) { in onPerformDirectAction() argument
104 reportActionFailed(callback); in onPerformDirectAction()
112 reportActionExecuting(callback); in onPerformDirectAction()
114 reportActionPerformed(callback); in onPerformDirectAction()
118 private void detectDestroyedInteractor(@NonNull RemoteCallback callback) { in detectDestroyedInteractor() argument
132 callback.sendResult(result); in detectDestroyedInteractor()
135 private void invalidateDirectActions(@NonNull RemoteCallback callback) { in invalidateDirectActions() argument
[all …]
/cts/tests/tests/location/src/android/location/cts/
DTestLocationManager.java62 public void registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) { in registerGnssMeasurementCallback() argument
65 mLocationManager.registerGnssMeasurementsCallback(callback); in registerGnssMeasurementCallback()
79 public void registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback, in registerGnssMeasurementCallback() argument
83 mLocationManager.registerGnssMeasurementsCallback(callback, handler); in registerGnssMeasurementCallback()
97 public void unregisterGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) { in unregisterGnssMeasurementCallback() argument
99 mLocationManager.unregisterGnssMeasurementsCallback(callback); in unregisterGnssMeasurementCallback()
181 GnssNavigationMessage.Callback callback) { in registerGnssNavigationMessageCallback() argument
183 return mLocationManager.registerGnssNavigationMessageCallback(callback); in registerGnssNavigationMessageCallback()
194 GnssNavigationMessage.Callback callback, Handler handler) { in registerGnssNavigationMessageCallback() argument
196 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()
/cts/tests/tests/telecom/src/android/telecom/cts/
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 …]
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 …]
/cts/tests/tests/print/src/android/print/cts/
DPrintDocumentAdapterContractTest.java91 … LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in noPrintOptionsOrPrinterChange()
96 callback.onLayoutFinished(info, false); in noPrintOptionsOrPrinterChange()
104 WriteResultCallback callback = (WriteResultCallback) args[3]; in noPrintOptionsOrPrinterChange()
107 callback.onWriteFinished(new PageRange[]{new PageRange(0, 1)}); in noPrintOptionsOrPrinterChange()
255 PrintDocumentAdapter.LayoutResultCallback callback = in nonCallingBackWrite()
259 callback.onLayoutFinished(new PrintDocumentInfo.Builder(PRINT_JOB_NAME) in nonCallingBackWrite()
269 PrintDocumentAdapter.WriteResultCallback callback = in nonCallingBackWrite()
274 .setOnCancelListener(() -> callback.onWriteCancelled()); in nonCallingBackWrite()
279 callback.onWriteFinished(new PageRange[]{new PageRange(0, 0)}); in nonCallingBackWrite()
326 PrintDocumentAdapter.LayoutResultCallback callback = in nonChangePrinterWhileNotWritten()
[all …]
DPageRangeAdjustmentTest.java172 … LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in somePagesWantedAndAllPagesWritten()
177 callback.onLayoutFinished(info, false); in somePagesWantedAndAllPagesWritten()
186 WriteResultCallback callback = (WriteResultCallback) args[3]; in somePagesWantedAndAllPagesWritten()
189 callback.onWriteFinished(new PageRange[] {PageRange.ALL_PAGES}); in somePagesWantedAndAllPagesWritten()
263 … LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in somePagesWantedAndSomeMorePagesWritten()
268 callback.onLayoutFinished(info, false); in somePagesWantedAndSomeMorePagesWritten()
276 WriteResultCallback callback = (WriteResultCallback) args[3]; in somePagesWantedAndSomeMorePagesWritten()
285 callback.onWriteFinished(pages); in somePagesWantedAndSomeMorePagesWritten()
289 callback.onWriteFinished(new PageRange[] {new PageRange(REQUESTED_PAGE - 1, in somePagesWantedAndSomeMorePagesWritten()
354 … LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in somePagesWantedAndNotWritten()
[all …]
/cts/tests/tests/systemui/src/android/systemui/cts/
DWindowInsetsBehaviorTests.java370 private int swipeBigX(Rect viewBoundary, BiConsumer<Point, Point> callback) { in swipeBigX() argument
376 if (callback != null) { in swipeBigX()
377 callback.accept(new Point(theLeftestLine, theToppestLine), in swipeBigX()
382 if (callback != null) { in swipeBigX()
383 callback.accept(new Point(theRightestLine, theToppestLine), in swipeBigX()
392 Consumer<Point> callback) { in clickAllOfHorizontalSamplePoints() argument
399 if (callback != null) { in clickAllOfHorizontalSamplePoints()
400 callback.accept(new Point(i, y)); in clickAllOfHorizontalSamplePoints()
406 if (callback != null) { in clickAllOfHorizontalSamplePoints()
407 callback.accept(new Point(theRightestLine, y)); in clickAllOfHorizontalSamplePoints()
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/
DIdleUidTest.java120 final CameraDevice.StateCallback callback = mock(CameraDevice.StateCallback.class); in assertCameraAccess() local
124 cameraManager.openCamera(cameraId, callback, handler); in assertCameraAccess()
138 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in assertCameraAccess()
140 verifyNoMoreInteractions(callback); in assertCameraAccess()
143 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in assertCameraAccess()
146 verifyNoMoreInteractions(callback); in assertCameraAccess()
158 final CameraDevice.StateCallback callback = mock(CameraDevice.StateCallback.class); in testCameraAccessBecomingInactiveUidByCamera() local
162 cameraManager.openCamera(cameraId, callback, handler); in testCameraAccessBecomingInactiveUidByCamera()
171 verify(callback, timeout(CAMERA_OPERATION_TIMEOUT_MILLIS) in testCameraAccessBecomingInactiveUidByCamera()
173 verifyNoMoreInteractions(callback); in testCameraAccessBecomingInactiveUidByCamera()
[all …]
/cts/tests/tests/background/src/android/app/cts/backgroundrestrictions/
DMyReceiver.java35 final Consumer<Intent>callback = sCallback.get(); in onReceive() local
36 if (callback != null) { in onReceive()
37 callback.accept(intent); in onReceive()
41 public static void setCallback(Consumer<Intent> callback) { in setCallback() argument
42 sCallback.set(callback); in setCallback()
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
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()

1234567