Home
last modified time | relevance | path

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

123

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRotateDrawableTest.java94 MockCallback callback = new MockCallback(); in testInvalidateDrawable() local
96 mRotateDrawable.setCallback(callback); in testInvalidateDrawable()
98 assertTrue(callback.hasCalledInvalidate()); in testInvalidateDrawable()
100 callback.reset(); in testInvalidateDrawable()
102 assertTrue(callback.hasCalledInvalidate()); in testInvalidateDrawable()
104 callback.reset(); in testInvalidateDrawable()
107 assertFalse(callback.hasCalledInvalidate()); in testInvalidateDrawable()
111 MockCallback callback = new MockCallback(); in testScheduleDrawable() local
113 mRotateDrawable.setCallback(callback); in testScheduleDrawable()
115 assertTrue(callback.hasCalledSchedule()); in testScheduleDrawable()
[all …]
DAnimatedVectorDrawableTest.java207 MyCallback callback = new MyCallback(); in testAddCallback() local
210 d1.registerAnimationCallback(callback); in testAddCallback()
221 assertTrue(callback.mStart); in testAddCallback()
222 assertTrue(callback.mEnd); in testAddCallback()
226 MyCallback callback = new MyCallback(); in testRemoveCallback() local
229 d1.registerAnimationCallback(callback); in testRemoveCallback()
230 assertTrue(d1.unregisterAnimationCallback(callback)); in testRemoveCallback()
241 assertFalse(callback.mStart); in testRemoveCallback()
242 assertFalse(callback.mEnd); in testRemoveCallback()
246 MyCallback callback = new MyCallback(); in testClearCallback() local
[all …]
DDrawableContainerTest.java529 MockCallBack callback = new MockCallBack(); in testInvalidateDrawable() local
530 mDrawableContainer.setCallback(callback); in testInvalidateDrawable()
532 callback.reset(); in testInvalidateDrawable()
534 assertFalse(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
538 callback.reset(); in testInvalidateDrawable()
540 assertTrue(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
546 callback.reset(); in testInvalidateDrawable()
548 assertFalse(callback.hasInvalidateDrawableCalled()); in testInvalidateDrawable()
550 callback.reset(); in testInvalidateDrawable()
552 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/
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 …]
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/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/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()
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/view/src/android/view/cts/
DWindowTest.java134 MockWindowCallback callback = new MockWindowCallback(); in testOpFlags() local
135 mWindow.setCallback(callback); in testOpFlags()
136 assertFalse(callback.isOnWindowAttributesChangedCalled()); in testOpFlags()
143 assertTrue(callback.isOnWindowAttributesChangedCalled()); in testOpFlags()
180 MockWindowCallback callback = new MockWindowCallback(); in testAccessAttributes() local
181 mWindow.setCallback(callback); in testAccessAttributes()
182 assertSame(callback, mWindow.getCallback()); in testAccessAttributes()
183 assertFalse(callback.isOnWindowAttributesChangedCalled()); in testAccessAttributes()
191 assertTrue(callback.isOnWindowAttributesChangedCalled()); in testAccessAttributes()
536 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/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/print/src/android/print/cts/
DPageRangeAdjustmentTest.java101 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testAllPagesWantedAndAllPagesWritten()
106 callback.onLayoutFinished(info, false); in testAllPagesWantedAndAllPagesWritten()
117 WriteResultCallback callback = (WriteResultCallback) args[3]; in testAllPagesWantedAndAllPagesWritten()
120 callback.onWriteFinished(pages); in testAllPagesWantedAndAllPagesWritten()
206 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testSomePagesWantedAndAllPagesWritten()
211 callback.onLayoutFinished(info, false); in testSomePagesWantedAndAllPagesWritten()
223 WriteResultCallback callback = (WriteResultCallback) args[3]; in testSomePagesWantedAndAllPagesWritten()
226 callback.onWriteFinished(new PageRange[] {PageRange.ALL_PAGES}); in testSomePagesWantedAndAllPagesWritten()
321 LayoutResultCallback callback = (LayoutResultCallback) invocation.getArguments()[3]; in testSomePagesWantedAndSomeMorePagesWritten()
326 callback.onLayoutFinished(info, false); in testSomePagesWantedAndSomeMorePagesWritten()
[all …]
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()
197 LayoutResultCallback callback = (LayoutResultCallback) in testNoPrintOptionsOrPrinterChangeCanceled()
203 callback.onLayoutFinished(info, false); in testNoPrintOptionsOrPrinterChangeCanceled()
212 WriteResultCallback callback = (WriteResultCallback) args[3]; in testNoPrintOptionsOrPrinterChangeCanceled()
215 callback.onWriteFinished(pages); in testNoPrintOptionsOrPrinterChangeCanceled()
290 LayoutResultCallback callback = (LayoutResultCallback) in testPrintOptionsChangeAndNoPrinterChange()
296 callback.onLayoutFinished(info, false); in testPrintOptionsChangeAndNoPrinterChange()
[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/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/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()
/cts/libs/deviceutil/src/android/cts/util/
DWatchDog.java41 public WatchDog(long timeoutInMilliSecs, TimeoutCallback callback) { in WatchDog() argument
43 mCallback = callback; in WatchDog()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DWatchDog.java40 public WatchDog(long timeoutInMilliSecs, TimeoutCallback callback) { in WatchDog() argument
42 mCallback = callback; in WatchDog()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dsend_to_client_1.rs4 void callback(int id){
/cts/tests/tests/widget/src/android/widget/cts/util/
DXmlUtils.java229 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
242 writeMapXml(val, out, callback); in writeMapXml()
262 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
272 writeValueXml(e.getValue(), (String)e.getKey(), out, callback); in writeMapXml() local
613 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeValueXml() argument
678 } else if (callback != null) { in writeValueXml()
679 callback.writeUnknownObject(v, name, out); in writeValueXml()
794 String[] name, ReadMapCallback callback) in readThisMapXml() argument
802 Object val = readThisValueXml(parser, name, callback, false); in readThisMapXml()
823 String[] name, ReadMapCallback callback) in readThisArrayMapXml() argument
[all …]
/cts/tests/tests/view/src/android/view/cts/util/
DXmlUtils.java228 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
241 writeMapXml(val, out, callback); in writeMapXml()
261 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
271 writeValueXml(e.getValue(), (String)e.getKey(), out, callback); in writeMapXml() local
612 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeValueXml() argument
677 } else if (callback != null) { in writeValueXml()
678 callback.writeUnknownObject(v, name, out); in writeValueXml()
793 String[] name, ReadMapCallback callback) in readThisMapXml() argument
801 Object val = readThisValueXml(parser, name, callback, false); in readThisMapXml()
822 String[] name, ReadMapCallback callback) in readThisArrayMapXml() argument
[all …]
/cts/tests/tests/content/src/android/content/cts/util/
DXmlUtils.java255 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
268 writeMapXml(val, out, callback); in writeMapXml()
289 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeMapXml() argument
299 writeValueXml(e.getValue(), (String)e.getKey(), out, callback); in writeMapXml() local
640 WriteMapCallback callback) throws XmlPullParserException, IOException { in writeValueXml() argument
705 } else if (callback != null) { in writeValueXml()
706 callback.writeUnknownObject(v, name, out); in writeValueXml()
821 String[] name, ReadMapCallback callback) in readThisMapXml() argument
829 Object val = readThisValueXml(parser, name, callback, false); in readThisMapXml()
850 String[] name, ReadMapCallback callback) in readThisArrayMapXml() argument
[all …]

123