Home
last modified time | relevance | path

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

123

/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()
167 GnssNavigationMessage.Callback callback) { in registerGnssNavigationMessageCallback() argument
169 return mLocationManager.registerGnssNavigationMessageCallback(callback); in registerGnssNavigationMessageCallback()
180 GnssNavigationMessage.Callback callback, Handler handler) { in registerGnssNavigationMessageCallback() argument
182 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/tests/graphics/src/android/graphics/drawable/cts/
DRotateDrawableTest.java148 MockCallback callback = new MockCallback(); in testInvalidateDrawable() local
150 mRotateDrawable.setCallback(callback); in testInvalidateDrawable()
152 assertTrue(callback.hasCalledInvalidate()); in testInvalidateDrawable()
154 callback.reset(); in testInvalidateDrawable()
156 assertTrue(callback.hasCalledInvalidate()); in testInvalidateDrawable()
158 callback.reset(); in testInvalidateDrawable()
161 assertFalse(callback.hasCalledInvalidate()); in testInvalidateDrawable()
165 MockCallback callback = new MockCallback(); in testScheduleDrawable() local
167 mRotateDrawable.setCallback(callback); in testScheduleDrawable()
169 assertTrue(callback.hasCalledSchedule()); in testScheduleDrawable()
[all …]
DAnimatedVectorDrawableTest.java286 final MyCallback callback = new MyCallback(); in testAddCallbackBeforeStart() local
294 d1.registerAnimationCallback(callback); in testAddCallbackBeforeStart()
300 assertTrue(callback.mStart); in testAddCallbackBeforeStart()
301 assertTrue(callback.mEnd); in testAddCallbackBeforeStart()
306 final MyCallback callback = new MyCallback(); in testAddCallbackAfterTrigger() local
317 d1.registerAnimationCallback(callback); in testAddCallbackAfterTrigger()
323 assertTrue(callback.mStart); in testAddCallbackAfterTrigger()
324 assertTrue(callback.mEnd); in testAddCallbackAfterTrigger()
329 final MyCallback callback = new MyCallback(); in testAddCallbackAfterStart() local
338 d1.registerAnimationCallback(callback); in testAddCallbackAfterStart()
[all …]
DDrawableContainerTest.java572 MockCallBack callback = new MockCallBack(); in testInvalidateDrawable() local
573 mDrawableContainer.setCallback(callback); in testInvalidateDrawable()
575 callback.reset(); in testInvalidateDrawable()
577 assertFalse(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
581 callback.reset(); in testInvalidateDrawable()
583 assertTrue(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
589 callback.reset(); in testInvalidateDrawable()
591 assertFalse(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
593 callback.reset(); in testInvalidateDrawable()
595 assertFalse(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
[all …]
DClipDrawableTest.java188 MockCallback callback = new MockCallback(); in testInvalidateDrawable() local
189 clipDrawable.setCallback(callback); in testInvalidateDrawable()
191 assertSame(clipDrawable, callback.getInvalidateDrawable()); in testInvalidateDrawable()
234 MockCallback callback = new MockCallback(); in testOnLevelChange() local
235 mockClipDrawable.setCallback(callback); in testOnLevelChange()
240 assertSame(mockClipDrawable, callback.getInvalidateDrawable()); in testOnLevelChange()
274 MockCallback callback = new MockCallback(); in testScheduleDrawable() local
275 clipDrawable.setCallback(callback); in testScheduleDrawable()
277 assertEquals(clipDrawable, callback.getScheduleDrawable()); in testScheduleDrawable()
278 assertNull(callback.getRunnable()); in testScheduleDrawable()
[all …]
/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.java171 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_StateChange() local
173 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_StateChange()
180 mRemoteConnectionObject.registerCallback(callback, handler); in testRemoteConnectionCallbacks_StateChange()
185 mRemoteConnectionObject.unregisterCallback(callback); in testRemoteConnectionCallbacks_StateChange()
197 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_RingbackRequest() local
199 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_RingbackRequest()
206 mRemoteConnectionObject.registerCallback(callback, handler); in testRemoteConnectionCallbacks_RingbackRequest()
211 mRemoteConnectionObject.unregisterCallback(callback); in testRemoteConnectionCallbacks_RingbackRequest()
223 RemoteConnection.Callback callback; in testRemoteConnectionCallbacks_ConnectionCapabilities() local
225 callback = new RemoteConnection.Callback() { in testRemoteConnectionCallbacks_ConnectionCapabilities()
[all …]
/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()
/cts/tests/tests/view/src/android/view/cts/
DWindowTest.java137 MockWindowCallback callback = new MockWindowCallback(); in testOpFlags() local
138 mWindow.setCallback(callback); in testOpFlags()
139 assertFalse(callback.isOnWindowAttributesChangedCalled()); in testOpFlags()
146 assertTrue(callback.isOnWindowAttributesChangedCalled()); in testOpFlags()
183 MockWindowCallback callback = new MockWindowCallback(); in testAccessAttributes() local
184 mWindow.setCallback(callback); in testAccessAttributes()
185 assertSame(callback, mWindow.getCallback()); in testAccessAttributes()
186 assertFalse(callback.isOnWindowAttributesChangedCalled()); in testAccessAttributes()
194 assertTrue(callback.isOnWindowAttributesChangedCalled()); in testAccessAttributes()
539 MockWindowCallback callback; in testSetDefaultWindowFormat() local
[all …]
DActionModeCallback2Test.java38 MockActionModeCallback2 callback = new MockActionModeCallback2(); in testCallbackOnGetContentRectDefaultWithView() local
39 callback.onGetContentRect(null, view, outRect); in testCallbackOnGetContentRectDefaultWithView()
49 MockActionModeCallback2 callback = new MockActionModeCallback2(); in testCallbackOnGetContentRectDefaultWithoutView() local
50 callback.onGetContentRect(null, null, outRect); in testCallbackOnGetContentRectDefaultWithoutView()
DKeyEventTest.java112 MockCallback callback = new MockCallback(); in testDispatch() local
114 callback.reset(); in testDispatch()
115 assertFalse(callback.isKeyDown()); in testDispatch()
116 assertTrue(mKeyEvent.dispatch(callback)); in testDispatch()
117 assertTrue(callback.isKeyDown()); in testDispatch()
118 assertEquals(KeyEvent.KEYCODE_0, callback.getKeyCode()); in testDispatch()
119 assertSame(mKeyEvent, callback.getKeyEvent()); in testDispatch()
122 callback.reset(); in testDispatch()
123 assertFalse(callback.isKeyUp()); in testDispatch()
124 assertTrue(mKeyEvent.dispatch(callback)); in testDispatch()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DMidiSoloTest.java97 MidiManager.DeviceCallback callback = new MidiManager.DeviceCallback(); in testMidiManager() local
100 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
101 midiManager.registerDeviceCallback(callback, null); in testMidiManager()
102 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
103 midiManager.registerDeviceCallback(callback, new Handler(Looper.getMainLooper())); in testMidiManager()
104 midiManager.registerDeviceCallback(callback, new Handler(Looper.getMainLooper())); in testMidiManager()
105 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
106 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
107 midiManager.unregisterDeviceCallback(callback); in testMidiManager()
DAudioRecordingConfigurationTest.java140 MyAudioRecordingCallback callback = new MyAudioRecordingCallback( in testCallback() local
142 am.registerAudioRecordingCallback(callback, null /*handler*/); in testCallback()
149 assertTrue("AudioRecordingCallback not called", callback.mCalled); in testCallback()
150 assertTrue("Expected record configuration was not found", callback.mParamMatch); in testCallback()
153 callback.reset(); in testCallback()
156 assertTrue("AudioRecordingCallback not called", callback.mCalled); in testCallback()
157 assertFalse("Should not have found test record configuration", callback.mParamMatch); in testCallback()
160 am.unregisterAudioRecordingCallback(callback); in testCallback()
161 callback.reset(); in testCallback()
164 assertFalse("Unregistered callback was called", callback.mCalled); in testCallback()
[all …]
DEnumDevicesTest.java177 AudioDeviceCallback callback = new EmptyDeviceCallback(); in test_deviceCallback() local
180 mAudioManager.registerAudioDeviceCallback(callback, null); in test_deviceCallback()
187 mAudioManager.unregisterAudioDeviceCallback(callback); in test_deviceCallback()
189 mAudioManager.unregisterAudioDeviceCallback(callback); in test_deviceCallback()
193 mAudioManager.registerAudioDeviceCallback(callback, new Handler()); in test_deviceCallback()
199 mAudioManager.unregisterAudioDeviceCallback(callback); in test_deviceCallback()
201 mAudioManager.unregisterAudioDeviceCallback(callback); in test_deviceCallback()
/cts/tests/tests/print/src/android/print/cts/
DPrintDocumentAdapterContractTest.java77 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testNoPrintOptionsOrPrinterChange()
82 callback.onLayoutFinished(info, false); in testNoPrintOptionsOrPrinterChange()
93 WriteResultCallback callback = (WriteResultCallback) args[3]; in testNoPrintOptionsOrPrinterChange()
96 callback.onWriteFinished(pages); in testNoPrintOptionsOrPrinterChange()
201 LayoutResultCallback callback = (LayoutResultCallback) in testNoPrintOptionsOrPrinterChangeCanceled()
207 callback.onLayoutFinished(info, false); in testNoPrintOptionsOrPrinterChangeCanceled()
216 WriteResultCallback callback = (WriteResultCallback) args[3]; in testNoPrintOptionsOrPrinterChangeCanceled()
219 callback.onWriteFinished(pages); in testNoPrintOptionsOrPrinterChangeCanceled()
295 LayoutResultCallback callback = (LayoutResultCallback) in testPrintOptionsChangeAndNoPrinterChange()
301 callback.onLayoutFinished(info, false); in testPrintOptionsChangeAndNoPrinterChange()
[all …]
DPageRangeAdjustmentTest.java103 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testAllPagesWantedAndAllPagesWritten()
108 callback.onLayoutFinished(info, false); in testAllPagesWantedAndAllPagesWritten()
119 WriteResultCallback callback = (WriteResultCallback) args[3]; in testAllPagesWantedAndAllPagesWritten()
122 callback.onWriteFinished(pages); in testAllPagesWantedAndAllPagesWritten()
211 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testSomePagesWantedAndAllPagesWritten()
216 callback.onLayoutFinished(info, false); in testSomePagesWantedAndAllPagesWritten()
228 WriteResultCallback callback = (WriteResultCallback) args[3]; in testSomePagesWantedAndAllPagesWritten()
231 callback.onWriteFinished(new PageRange[] {PageRange.ALL_PAGES}); in testSomePagesWantedAndAllPagesWritten()
331 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testSomePagesWantedAndSomeMorePagesWritten()
336 callback.onLayoutFinished(info, false); in testSomePagesWantedAndSomeMorePagesWritten()
[all …]
/cts/hostsidetests/atrace/src/android/atrace/cts/
DAtraceHostTest.java72 private static void parseLine(String line, FtraceEntryCallback callback) { in parseLine() argument
75 callback.onTraceEntry( in parseLine()
86 callback.onTraceEntry( in parseLine()
97 callback.onTraceEntry( in parseLine()
108 private static void parse(Reader reader, FtraceEntryCallback callback) throws Exception { in parse() argument
113 FtraceParser.parseLine(line, callback); in parse()
116 callback.onFinished(); in parse()
230 FtraceEntryCallback callback = new FtraceEntryCallback() { in testTracingContent() local
297 FtraceParser.parse(new StringReader(traceData), callback); in testTracingContent()
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java294 final TestNetworkCallback callback = new TestNetworkCallback(); in testRegisterNetworkCallback() local
295 mCm.registerNetworkCallback(makeWifiNetworkRequest(), callback); in testRegisterNetworkCallback() local
312 wifiNetwork = callback.waitForAvailable(); in testRegisterNetworkCallback()
321 mCm.unregisterNetworkCallback(callback); in testRegisterNetworkCallback()
462 final TestNetworkCallback callback = new TestNetworkCallback(); in connectToWifi() local
463 mCm.registerNetworkCallback(makeWifiNetworkRequest(), callback); in connectToWifi() local
476 wifiNetwork = callback.waitForAvailable(); in connectToWifi()
482 mCm.unregisterNetworkCallback(callback); in connectToWifi()
517 final TestNetworkCallback callback = new TestNetworkCallback(); in disconnectFromWifi() local
518 mCm.registerNetworkCallback(makeWifiNetworkRequest(), callback); in disconnectFromWifi() local
[all …]
/cts/tests/tests/webkit/src/android/webkit/cts/
DCookieManagerTest.java180 final ValueCallback<Boolean> callback = new ValueCallback<Boolean>() { in testSetCookieCallback() local
274 final ValueCallback<Boolean> callback = new ValueCallback<Boolean>() { in testRemoveCookiesCallback() local
295 removeSessionCookiesOnUiThread(callback); in testRemoveCookiesCallback()
303 removeSessionCookiesOnUiThread(callback); in testRemoveCookiesCallback()
308 removeAllCookiesOnUiThread(callback); in testRemoveCookiesCallback()
317 removeAllCookiesOnUiThread(callback); in testRemoveCookiesCallback()
413 private void removeAllCookiesOnUiThread(final ValueCallback<Boolean> callback) { in removeAllCookiesOnUiThread() argument
417 mCookieManager.removeAllCookies(callback); in removeAllCookiesOnUiThread()
422 private void removeSessionCookiesOnUiThread(final ValueCallback<Boolean> callback) { in removeSessionCookiesOnUiThread() argument
426 mCookieManager.removeSessionCookies(callback); in removeSessionCookiesOnUiThread()
[all …]
/cts/tests/tests/speech/src/android/speech/tts/cts/
DStubTextToSpeechService.java77 protected void onSynthesizeText(SynthesisRequest request, SynthesisCallback callback) { in onSynthesizeText() argument
78 if (callback.start(16000, AudioFormat.ENCODING_PCM_16BIT, 1) != TextToSpeech.SUCCESS) { in onSynthesizeText()
94 if (callback.audioAvailable(data, 0, data.length) != TextToSpeech.SUCCESS) { in onSynthesizeText()
97 if (callback.done() != TextToSpeech.SUCCESS) { in onSynthesizeText()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCameraUtils.java45 CameraCallback callback = new CameraCallback(); in blockUntilOpenCamera() local
46 cameraManager.openCamera(cameraId, callback, handler); in blockUntilOpenCamera()
47 return callback.waitForResult(); in blockUntilOpenCamera()

123