Home
last modified time | relevance | path

Searched refs:mCallback (Results 1 – 25 of 56) sorted by relevance

123

/cts/tests/tests/media/src/android/media/cts/
DMediaControllerTest.java57 private MediaSessionCallback mCallback = new MediaSessionCallback(); field in MediaControllerTest
67 mSession.setCallback(mCallback, mHandler); in setUp()
163 mCallback.reset(); in testSendCommand()
169 assertTrue(mCallback.mOnCommandCalled); in testSendCommand()
170 assertNotNull(mCallback.mCommandCallback); in testSendCommand()
171 assertEquals(command, mCallback.mCommand); in testSendCommand()
172 assertEquals(EXTRAS_VALUE, mCallback.mExtras.getString(EXTRAS_KEY)); in testSendCommand()
173 assertTrue(compareRemoteUserInfo(mControllerInfo, mCallback.mCallerInfo)); in testSendCommand()
198 mCallback.reset(); in testSetPlaybackSpeed()
204 assertTrue(mCallback.mOnSetPlaybackSpeedCalled); in testSetPlaybackSpeed()
[all …]
DMediaSessionTest.java84 private MediaControllerCallback mCallback = new MediaControllerCallback(); field in MediaSessionTest
171 controller.registerCallback(mCallback, mHandler); in testConfigureSession()
172 final MediaController.Callback callback = (MediaController.Callback) mCallback; in testConfigureSession()
176 mCallback.resetLocked(); in testConfigureSession()
181 assertTrue(mCallback.mOnExtraChangedCalled); in testConfigureSession()
183 callback.onExtrasChanged(mCallback.mExtras); in testConfigureSession()
185 Bundle extrasOut = mCallback.mExtras; in testConfigureSession()
198 mCallback.resetLocked(); in testConfigureSession()
203 assertTrue(mCallback.mOnMetadataChangedCalled); in testConfigureSession()
205 callback.onMetadataChanged(mCallback.mMediaMetadata); in testConfigureSession()
[all …]
DMediaButtonReceiverService.java29 public static Consumer<KeyEvent> mCallback; field in MediaButtonReceiverService
37 mCallback = callback; in setCallback()
46 if (mCallback != null) { in onHandleIntent()
47 mCallback.accept(keyEvent); in onHandleIntent()
DMediaButtonBroadcastReceiver.java29 public static Consumer<KeyEvent> mCallback; field in MediaButtonBroadcastReceiver
36 if (mCallback != null) { in onReceive()
37 mCallback.accept(keyEvent); in onReceive()
44 mCallback = callback; in setCallback()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DCarrierMessagingServiceWrapperTest.java66 private CarrierMessagingServiceWrapper.CarrierMessagingCallback mCallback; field in CarrierMessagingServiceWrapperTest
127 Mockito.reset(mCallback); in testReceiveSms()
130 mTestSub, Runnable::run, mCallback); in testReceiveSms()
133 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onReceiveSmsComplete( in testReceiveSms()
147 Mockito.reset(mCallback); in testSendTextSms()
149 destAddress, 0, Runnable::run, mCallback); in testSendTextSms()
152 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onSendSmsComplete( in testSendTextSms()
166 Mockito.reset(mCallback); in testSendDataSms()
169 destAddress, -1, 0, Runnable::run, mCallback); in testSendDataSms() local
172 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onSendSmsComplete( in testSendDataSms()
[all …]
/cts/tests/tests/car/src/android/car/cts/
DCarAudioManagerTest.java62 private SyncCarVolumeCallback mCallback; field in CarAudioManagerTest
75 if (mCallback != null) { in cleanUp()
78 () -> mCarAudioManager.unregisterCarVolumeCallback(mCallback)); in cleanUp()
114 mCallback = new SyncCarVolumeCallback(); in registerCarVolumeCallback_nonNullCallback_throwsPermissionError()
117 () -> mCarAudioManager.registerCarVolumeCallback(mCallback)); in registerCarVolumeCallback_nonNullCallback_throwsPermissionError()
125 mCallback = new SyncCarVolumeCallback(); in registerCarVolumeCallback_onGroupVolumeChanged()
128 () -> mCarAudioManager.registerCarVolumeCallback(mCallback)); in registerCarVolumeCallback_onGroupVolumeChanged()
132 .that(mCallback.receivedGroupVolumeChanged()) in registerCarVolumeCallback_onGroupVolumeChanged()
139 mCallback = new SyncCarVolumeCallback(); in registerCarVolumeCallback_onMasterMuteChanged()
142 () -> mCarAudioManager.registerCarVolumeCallback(mCallback)); in registerCarVolumeCallback_onMasterMuteChanged()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DScrollCaptureTargetTest.java69 private MockScrollCaptureCallback mCallback; field in ScrollCaptureTargetTest
76 mCallback = new MockScrollCaptureCallback(); in setUp()
82 new ScrollCaptureTarget(null, new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testConstructor_requiresNonNullTarget()
88 new ScrollCaptureTarget(mTargetView, null, new Point(5, 6), mCallback); in testConstructor_requiresNonNullVisibleRect()
94 new ScrollCaptureTarget(mTargetView, new Rect(1, 2, 3, 4), null, mCallback); in testConstructor_requiresNonNullPosition()
108 new Rect(0, 0, 10, 10), new Point(5, 5), mCallback); in testScrollBounds()
133 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testContainingView()
142 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testLocalVisibleRect()
152 new Rect(0, 0, 2, 2), new Point(0, 0), mCallback); in testPositionInWindow()
173 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testCallback()
[all …]
DKeyEventInjectionActivity.java26 private KeyEvent.Callback mCallback; field in KeyEventInjectionActivity
32 return mCallback.onKeyDown(keyCode, event); in onKeyDown()
37 return mCallback.onKeyUp(keyCode, event); in onKeyUp()
42 return mCallback.onKeyLongPress(keyCode, event); in onKeyLongPress()
48 return mCallback.onKeyMultiple(keyCode, count, event); in onKeyMultiple()
52 mCallback = callback; in setCallback()
/cts/tests/app/src/android/app/cts/
DActivityActionModeTest.java39 private ActionMode.Callback mCallback; field in ActivityActionModeTest
47 mCallback = mock(ActionMode.Callback.class); in setUp()
48 when(mCallback.onCreateActionMode(any(), any())).thenReturn(true); in setUp()
49 when(mCallback.onPrepareActionMode(any(), any())).thenReturn(true); in setUp()
60 mCallback, ActionMode.TYPE_PRIMARY); in testStartPrimaryActionMode()
74 mCallback, ActionMode.TYPE_FLOATING); in testStartFloatingActionMode()
87 final ActionMode mode = mActivityRule.getActivity().startActionMode(mCallback); in testStartTypelessActionMode()
/cts/tests/autofillservice/src/android/autofillservice/cts/activities/
DAbstractAutoFillActivity.java49 private MyAutofillCallback mCallback; field in AbstractAutoFillActivity
117 assertWithMessage("already registered").that(mCallback).isNull(); in registerCallback()
118 mCallback = new MyAutofillCallback(); in registerCallback()
119 getAutofillManager().registerCallback(mCallback); in registerCallback()
120 return mCallback; in registerCallback()
130 assertWithMessage("not registered").that(mCallback).isNotNull(); in unregisterCallback()
144 getAutofillManager().unregisterCallback(mCallback); in unregisterNonNullCallback()
145 mCallback = null; in unregisterNonNullCallback()
174 if (mCallback != null) { in finishOnly()
/cts/tests/tests/telephony/current/src/android/telephony/euicc/cts/
DEuiccServiceTest.java76 private IMockEuiccServiceCallback mCallback; field in EuiccServiceTest
150 mCallback = new MockEuiccServiceCallback(); in setUp()
151 MockEuiccService.setCallback(mCallback); in setUp()
163 mCallback.reset(); in tearDown()
209 assertTrue(mCallback.isMethodCalled()); in testOnGetEid()
232 assertTrue(mCallback.isMethodCalled()); in testOnGetOtaStatus()
260 assertTrue(mCallback.isMethodCalled()); in testOnGetDownloadableSubscriptionMetadata()
283 assertTrue(mCallback.isMethodCalled()); in testOnStartOtaIfNecessary()
308 assertTrue(mCallback.isMethodCalled()); in testOnGetDefaultDownloadableSubscriptionList()
339 assertTrue(mCallback.isMethodCalled()); in testOnDownloadSubscription()
[all …]
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputManagerTest.java73 private LoggingCallback mCallback = new LoggingCallback(); field in TvInputManagerTest
163 mCallback.mTunedInfos = null; in tryTuneAllChannels()
175 return mCallback.mTunedInfos != null; in tryTuneAllChannels()
200 assertEquals(1, mCallback.mTunedInfos.size()); in tryTuneAllChannels()
201 TunedInfo callbackInfo = mCallback.mTunedInfos.get(0); in tryTuneAllChannels()
214 mManager.registerCallback(mCallback, new Handler()); in testGetCurrentTunedInfos()
221 mManager.unregisterCallback(mCallback); in testGetCurrentTunedInfos()
289 mManager.registerCallback(mCallback, new Handler()); in testRegisterUnregisterCallback()
290 mManager.unregisterCallback(mCallback); in testRegisterUnregisterCallback()
306 mManager.registerCallback(mCallback, new Handler()); in testInputAddedAndRemoved()
[all …]
DBundledTvInputServiceTest.java52 private final MockCallback mCallback = new MockCallback(); field in BundledTvInputServiceTest
110 mTvView.setCallback(mCallback); in setUp()
138 mCallback.mVideoUnavailableReasonMap.remove(info.getId()); in testTune()
150 Integer reason = mCallback.getVideoUnavailableReason(info.getId()); in testTune()
172 mCallback.mVideoUnavailableReasonMap.remove(info.getId()); in testTuneStress()
185 Integer reason = mCallback.getVideoUnavailableReason(info.getId()); in testTuneStress()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DDynamicSensorDiscoveryTestActivity.java51 private Callback mCallback; field in DynamicSensorDiscoveryTestActivity
80 mCallback = new Callback(); in activitySetUp()
81 mSensorManager.registerDynamicSensorCallback(mCallback); in activitySetUp()
91 Assert.assertTrue("Cannot detect sensor connection.", mCallback.waitForConnection(null)); in test0_OnConnect()
93 mSensorId = mCallback.getSensorId(); in test0_OnConnect()
106 mCallback.isSensorInList()); in test1_DynamicSensorList()
109 mCallback.isSensorInListOfSpecificType()); in test1_DynamicSensorList()
122 Assert.assertTrue("Failed to receive sensor events", mCallback.waitForSensorEvent()); in test2_SensorOperation()
133 Assert.assertTrue("Cannot detect sensor disconnection.", mCallback.waitForDisconnection()); in test3_OnDisconnect()
147 mCallback.waitForConnection(mSensorId)); in test4_OnReconnect()
[all …]
/cts/tests/translation/src/android/translation/cts/
DCtsTestIme.java59 private FakeTranslationStateCallback mCallback; field in CtsTestIme
88 mCallback = new FakeTranslationStateCallback(); in registerUiTranslationStateCallback()
90 manager.registerUiTranslationStateCallback(executor, mCallback); in registerUiTranslationStateCallback()
97 manager.unregisterUiTranslationStateCallback(mCallback); in unregisterUiTranslationStateCallback()
103 final Pair<ULocale, ULocale> startedLanguagePair = mCallback.getStartedLanguagePair(); in assertOnStart()
112 result.putExtra(EXTRA_VERIFY_RESULT, mCallback.isOnFinishedCalled()); in assertOnFinish()
118 result.putExtra(EXTRA_VERIFY_RESULT, mCallback.isOnResumedCalled()); in assertOnResume()
124 result.putExtra(EXTRA_VERIFY_RESULT, mCallback.isOnPausedCalled()); in assertOnPause()
153 mCallback.resetStates(); in notifyCommandDone()
/cts/tests/app/app/src/android/app/stubs/
DSimpleActivity.java30 private IBinder mCallback; field in SimpleActivity
39 mCallback = extras.getBinder(CommandReceiver.EXTRA_CALLBACK); in onCreate()
50 if (mCallback != null) { in onTrimMemory()
55 mCallback.transact(IBinder.FIRST_CALL_TRANSACTION, data, reply, 0); in onTrimMemory()
/cts/tests/app/CantSaveState1/src/com/android/test/cantsavestate2/
DCantSave1Activity.java31 private IBinder mCallback; field in CantSave1Activity
41 mCallback = extras.getBinder(EXTRA_CALLBACK); in onCreate()
47 if (mCallback != null) { in onTrimMemory()
52 mCallback.transact(IBinder.FIRST_CALL_TRANSACTION, data, reply, 0); in onTrimMemory()
/cts/apps/CtsVerifier/src/org/hyphonate/megaaudio/recorder/sinks/
DAppCallbackAudioSink.java23 private AppCallback mCallback; field in AppCallbackAudioSink
26 mCallback = callback; in AppCallbackAudioSink()
31 mCallback.onDataReady(audioData, numFrames); in push()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DWatchDog.java35 private TimeoutCallback mCallback = null; field in WatchDog
43 mCallback = callback; in WatchDog()
84 if (mCallback == null) { in run()
87 mCallback.onTimeout(); in run()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DWindowInsetsAnimationTests.java78 waitForOrFail("Waiting until animation done", () -> mActivity.mCallback.animationDone); in testAnimationCallbacksHide()
88 waitForOrFail("Waiting until animation done", () -> mActivity.mCallback.animationDone); in testAnimationCallbacksShow()
89 mActivity.mCallback.animationDone = false; in testAnimationCallbacksShow()
96 waitForOrFail("Waiting until animation done", () -> mActivity.mCallback.animationDone); in testAnimationCallbacksShow()
174 verifyZeroInteractions(mActivity.mCallback); in testAnimationCallbacks_consumedByDecor()
186 waitForOrFail("Waiting until animation done", () -> mActivity.mCallback.animationDone); in testAnimationCallbacks_childDoesntGetCallback()
249 waitForOrFail("Waiting until animation done", () -> mActivity.mCallback.animationDone); in testAnimationCallbacks_withLegacyFlags()
252 verify(mActivity.mCallback).onPrepare(any()); in testAnimationCallbacks_withLegacyFlags()
253 verify(mActivity.mCallback).onStart(any(), any()); in testAnimationCallbacks_withLegacyFlags()
254 verify(mActivity.mCallback, atLeastOnce()).onProgress(any(), any()); in testAnimationCallbacks_withLegacyFlags()
[all …]
/cts/tests/musicrecognition/src/android/musicrecognition/cts/
DMusicRecognitionManagerTest.java88 @Mock MusicRecognitionManager.RecognitionCallback mCallback; field in MusicRecognitionManagerTest
140 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onAudioStreamClosed(); in testOnRecognitionFailed()
141 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onRecognitionFailed(any(), in testOnRecognitionFailed()
143 verify(mCallback, never()).onRecognitionSucceeded(any(), any(), any()); in testOnRecognitionFailed()
155 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onAudioStreamClosed(); in testOnRecognitionSucceeded()
156 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onRecognitionSucceeded(eq(request), in testOnRecognitionSucceeded()
158 verify(mCallback, never()).onRecognitionFailed(any(), anyInt()); in testOnRecognitionSucceeded()
174 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onAudioStreamClosed(); in testRemovesBindersFromBundle()
175 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onRecognitionSucceeded(eq(request), in testRemovesBindersFromBundle()
198 verify(mCallback, timeout(VERIFY_TIMEOUT_MS)).onRecognitionFailed(any(), in testDoesntBindToForeignService()
[all …]
/cts/hostsidetests/packagemanager/installedloadingprogess/deviceside/src/com/android/tests/loadingprogress/device/
DLoadingProgressTest.java63 private LauncherAppsCallback mCallback; field in LoadingProgressTest
78 if (mCallback != null) { in tearDown()
79 mLauncherApps.unregisterCallback(mCallback); in tearDown()
130 mCallback = new LauncherAppsCallback( in testOnPackageLoadingProgressChangedCalledWithPartialLoaded()
132 mLauncherApps.registerCallback(mCallback, new Handler(mCallbackThread.getLooper())); in testOnPackageLoadingProgressChangedCalledWithPartialLoaded()
139 mCallback = new LauncherAppsCallback(loadingProgress -> 1 - loadingProgress < 0.001); in testOnPackageLoadingProgressChangedCalledWithFullyLoaded()
140 mLauncherApps.registerCallback(mCallback, new Handler(mCallbackThread.getLooper())); in testOnPackageLoadingProgressChangedCalledWithFullyLoaded()
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DSurfaceControlTestCase.java90 if (mViewFactory.mCallback instanceof ParentSurfaceHolder) { in start()
91 ParentSurfaceHolder psh = (ParentSurfaceHolder) mViewFactory.mCallback; in start()
128 private SurfaceHolder.Callback mCallback; field in SurfaceControlTestCase.SurfaceViewFactory
131 mCallback = callback; in SurfaceViewFactory()
136 if (mCallback instanceof ParentSurfaceHolder) { in createView()
145 surfaceView.getHolder().addCallback(mCallback); in createView()
/cts/hostsidetests/devicepolicy/app/LauncherTestsSupport/src/com/android/cts/launchertests/support/
DLauncherCallbackTestsService.java71 private TestCallback mCallback; field in LauncherCallbackTestsService
145 if (mCallback != null) { in setup()
146 launcherApps.unregisterCallback(mCallback); in setup()
151 mCallback = new TestCallback(); in setup()
152 launcherApps.registerCallback(mCallback, new Handler(mCallbackThread.getLooper())); in setup()
161 if (mCallback != null) { in teardown()
162 launcherApps.unregisterCallback(mCallback); in teardown()
164 mCallback = null; in teardown()
/cts/tests/tests/telephony/current/src/android/telephony/embms/cts/
DMbmsGroupCallSessionTest.java38 mContext, mCallbackExecutor, mCallback); in testDuplicateSession()
70 mCallback.waitOnError().arg1); in testErrorDelivery()
81 SomeArgs callbackResult = mCallback.waitOnAvailableSaisUpdatedCalls(); in testCallbacks()
88 callbackResult = mCallback.waitOnServiceInterfaceAvailableCalls(); in testCallbacks()

123