/cts/tests/tests/media/bettertogether/src/android/media/bettertogether/cts/ |
D | MediaControllerTest.java | 73 private MediaSessionCallback mCallback = new MediaSessionCallback(); field in MediaControllerTest 86 mSession.setCallback(mCallback, mHandler); in setUp() 191 mCallback.reset(); in testSendCommand() 197 assertThat(mCallback.mOnCommandCalled).isTrue(); in testSendCommand() 198 assertThat(mCallback.mCommandCallback).isNotNull(); in testSendCommand() 199 assertThat(mCallback.mCommand).isEqualTo(command); in testSendCommand() 200 assertThat(mCallback.mExtras.getString(EXTRAS_KEY)).isEqualTo(EXTRAS_VALUE); in testSendCommand() 201 assertThat(compareRemoteUserInfo(mControllerInfo, mCallback.mCallerInfo)).isTrue(); in testSendCommand() 220 mCallback.reset(); in testSetPlaybackSpeed() 226 assertThat(mCallback.mOnSetPlaybackSpeedCalled).isTrue(); in testSetPlaybackSpeed() [all …]
|
D | MediaButtonBroadcastReceiver.java | 29 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()
|
D | MediaButtonReceiverService.java | 29 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()
|
D | MediaSessionTest.java | 109 private MediaControllerCallback mCallback = new MediaControllerCallback(); field in MediaSessionTest 243 controller.registerCallback(mCallback, mHandler); in testConfigureSession() 244 final MediaController.Callback callback = (MediaController.Callback) mCallback; in testConfigureSession() 248 mCallback.resetLocked(); in testConfigureSession() 253 assertThat(mCallback.mOnExtraChangedCalled).isTrue(); in testConfigureSession() 255 callback.onExtrasChanged(mCallback.mExtras); in testConfigureSession() 257 Bundle extrasOut = mCallback.mExtras; in testConfigureSession() 270 mCallback.resetLocked(); in testConfigureSession() 275 assertThat(mCallback.mOnMetadataChangedCalled).isTrue(); in testConfigureSession() 277 callback.onMetadataChanged(mCallback.mMediaMetadata); in testConfigureSession() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/ |
D | BleAdvertisingSetTestActivity.java | 86 private TestAdvertisingSetCallback mCallback; field in BleAdvertisingSetTestActivity 167 mCallback = new TestAdvertisingSetCallback(); in onCreate() 174 mCallback); in startAdvertisingSet() 175 assertTrue(mCallback.mAdvertisingSetStartedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in startAdvertisingSet() 176 assertEquals(ADVERTISE_SUCCESS, mCallback.mAdvertisingSetStartedStatus.get()); in startAdvertisingSet() 177 assertNotNull(mCallback.mAdvertisingSet); in startAdvertisingSet() 184 mCallback.reset(); in testEnableAndDisableAdvertising() 186 mCallback.mAdvertisingSet.get().enableAdvertising(/* enable= */ true, /* duration= */ 0, in testEnableAndDisableAdvertising() 188 assertTrue(mCallback.mAdvertisingEnabledLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testEnableAndDisableAdvertising() 189 assertEquals(ADVERTISE_SUCCESS, mCallback.mAdvertisingEnabledStatus.get()); in testEnableAndDisableAdvertising() [all …]
|
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/ |
D | BluetoothLeAdvertiserTest.java | 75 private TestAdvertisingSetCallback mCallback; field in BluetoothLeAdvertiserTest 91 mCallback = new TestAdvertisingSetCallback(); in setUp() 97 mAdvertiser.stopAdvertisingSet(mCallback); in tearDown() 98 assertTrue(mCallback.mAdvertisingSetStoppedLatch.await(TIMEOUT_MS, in tearDown() 113 mCallback, new Handler(Looper.getMainLooper())); in startAdvertisingSetWithCallbackAndHandler() 114 assertTrue(mCallback.mAdvertisingSetStartedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in startAdvertisingSetWithCallbackAndHandler() 115 assertEquals(ADVERTISE_SUCCESS, mCallback.mAdvertisingSetStartedStatus.get()); in startAdvertisingSetWithCallbackAndHandler() 116 assertNotNull(mCallback.mAdvertisingSet); in startAdvertisingSetWithCallbackAndHandler() 123 0, 0, mCallback); in startAdvertisingSetWithDurationAndCallback() 124 assertTrue(mCallback.mAdvertisingSetStartedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in startAdvertisingSetWithDurationAndCallback() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/ |
D | SensorHeadTrackerTest.java | 51 private Callback mCallback; field in SensorHeadTrackerTest 75 mCallback = new Callback(); in setUp() 78 mSensorManager.registerDynamicSensorCallback(mCallback, mVirtualHeadTracker.handler); in setUp() 103 mCallback.waitForConnection(VIRTUAL_HEAD_TRACKER_PRIMARY)); in testIsNotDynamicSensorDiscoverySupported() 112 mCallback.waitForConnection(VIRTUAL_HEAD_TRACKER_PRIMARY)); in testIsDynamicSensorDiscoverySupported() 134 mCallback.waitForConnection(VIRTUAL_HEAD_TRACKER_PRIMARY)); in testRegisterDynamicSensorCallback() 139 mCallback.mSensor.getType(), Sensor.TYPE_HEAD_TRACKER), in testRegisterDynamicSensorCallback() 140 mCallback.isTypeHeadTracker()); in testRegisterDynamicSensorCallback() 142 assertTrue("Sensor is a wake up sensor.", !mCallback.isNotWakeUpSensor()); in testRegisterDynamicSensorCallback() 144 assertTrue("Sensor is not a dynamic sensor.", mCallback.isDynamicSensor()); in testRegisterDynamicSensorCallback() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | KeyEventInjectionActivity.java | 26 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()
|
D | ScrollCaptureTargetTest.java | 81 private MockScrollCaptureCallback mCallback; field in ScrollCaptureTargetTest 88 mCallback = new MockScrollCaptureCallback(); in setUp() 94 new ScrollCaptureTarget(null, new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testConstructor_requiresNonNullTarget() 100 new ScrollCaptureTarget(mTargetView, null, new Point(5, 6), mCallback); in testConstructor_requiresNonNullVisibleRect() 106 new ScrollCaptureTarget(mTargetView, new Rect(1, 2, 3, 4), null, mCallback); in testConstructor_requiresNonNullPosition() 120 new Rect(0, 0, 10, 10), new Point(5, 5), mCallback); in testScrollBounds() 145 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testContainingView() 154 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testLocalVisibleRect() 164 new Rect(0, 0, 2, 2), new Point(0, 0), mCallback); in testPositionInWindow() 196 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testCallback() [all …]
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | CarrierMessagingServiceWrapperTest.java | 78 private CarrierMessagingServiceWrapper.CarrierMessagingCallback mCallback; field in CarrierMessagingServiceWrapperTest 147 Mockito.reset(mCallback); in testReceiveSms() 150 mTestSub, Runnable::run, mCallback); in testReceiveSms() 153 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onReceiveSmsComplete( in testReceiveSms() 167 Mockito.reset(mCallback); in testSendTextSms() 169 destAddress, 0, Runnable::run, mCallback); in testSendTextSms() 172 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onSendSmsComplete( in testSendTextSms() 186 Mockito.reset(mCallback); in testSendDataSms() 189 destAddress, -1, 0, Runnable::run, mCallback); in testSendDataSms() local 192 Mockito.verify(mCallback, Mockito.timeout(TIMEOUT_IN_MS)).onSendSmsComplete( in testSendDataSms() [all …]
|
/cts/tests/translation/src/android/translation/cts/ |
D | CtsTestIme.java | 56 private FakeTranslationStateCallback mCallback; field in CtsTestIme 85 mCallback = new FakeTranslationStateCallback(); in registerUiTranslationStateCallback() 87 manager.registerUiTranslationStateCallback(executor, mCallback); in registerUiTranslationStateCallback() 94 manager.unregisterUiTranslationStateCallback(mCallback); in unregisterUiTranslationStateCallback() 101 result.putExtra(EXTRA_SOURCE_LOCALE, mCallback.getStartedSourceLocale()); in assertOnStart() 102 result.putExtra(EXTRA_TARGET_LOCALE, mCallback.getStartedTargetLocale()); in assertOnStart() 103 result.putExtra(EXTRA_CALL_COUNT, mCallback.getStartedCallCount()); in assertOnStart() 104 result.putExtra(EXTRA_PACKAGE_NAME, mCallback.getStartedPackageName()); in assertOnStart() 110 result.putExtra(EXTRA_CALL_COUNT, mCallback.getFinishedCallCount()); in assertOnFinish() 111 result.putExtra(EXTRA_PACKAGE_NAME, mCallback.getFinishedPackageName()); in assertOnFinish() [all …]
|
/cts/tests/tests/car/src/android/car/cts/ |
D | SyncResultCallbackTest.java | 38 private final SyncResultCallback<Bundle> mCallback = new SyncResultCallback<Bundle>(); field in SyncResultCallbackTest 49 mCallback.onResult(mBundle); in testGet() 51 assertThat(mCallback.get().getDouble(KEY)).isEqualTo(VALUE); in testGet() 56 mCallback.onResult(mBundle); in testGetWithTimeout() 58 assertThat(mCallback.get(1000, TimeUnit.MILLISECONDS).getDouble(KEY)).isEqualTo(VALUE); in testGetWithTimeout() 64 () -> mCallback.get(100, TimeUnit.MILLISECONDS)); in testGetTimeoutException()
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityActionModeTest.java | 39 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/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/ |
D | VirtualCameraConfigTest.java | 72 private VirtualCameraCallback mCallback; field in VirtualCameraConfigTest 94 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfigBuilder_buildsCorrectConfig() 109 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfigBuilder_tooSmallWidth_throwsException() 120 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfig_largestWidth_succeeds() 132 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfig_tooLargeWidth_throwsException() 143 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfigBuilder_tooSmallHeight_throwsException() 154 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfig_largestHeight_succeeds() 166 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfig_tooLargeHeight_throwsException() 177 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfigBuilder_invalidFormat_throwsException() 188 .setVirtualCameraCallback(mExecutor, mCallback) in virtualCameraConfigBuilder_tooLowMaximumFramesPerSecond_throwsException() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/activities/ |
D | AbstractAutoFillActivity.java | 51 private MyAutofillCallback mCallback; field in AbstractAutoFillActivity 119 assertWithMessage("already registered").that(mCallback).isNull(); in registerCallback() 120 mCallback = new MyAutofillCallback(); in registerCallback() 121 getAutofillManager().registerCallback(mCallback); in registerCallback() 122 return mCallback; in registerCallback() 132 assertWithMessage("not registered").that(mCallback).isNotNull(); in unregisterCallback() 146 getAutofillManager().unregisterCallback(mCallback); in unregisterNonNullCallback() 147 mCallback = null; in unregisterNonNullCallback() 178 if (mCallback != null) { in finishOnly()
|
/cts/tests/tests/media/projection/src/android/media/projection/cts/ |
D | MediaProjectionTest.java | 81 private MediaProjection.Callback mCallback = null; field in MediaProjectionTest 102 if (mCallback != null) { in cleanup() 103 mMediaProjection.unregisterCallback(mCallback); in cleanup() 104 mCallback = null; in cleanup() 129 mCallback = new MediaProjection.Callback() { in testOverlayAllowedDuringScreenCapture() 135 mMediaProjection.registerCallback(mCallback, new Handler(Looper.getMainLooper())); in testOverlayAllowedDuringScreenCapture() 163 mCallback = new MediaProjection.Callback() { in testUnregisterCallback() 169 mMediaProjection.registerCallback(mCallback, new Handler(Looper.getMainLooper())); in testUnregisterCallback() 170 mMediaProjection.unregisterCallback(mCallback); in testUnregisterCallback() 188 mCallback = new MediaProjection.Callback() { in testCallbackOnStop() [all …]
|
/cts/tests/tests/media/projection/sdk34/src/android/media/projection/ |
D | MediaProjectionSDK34Test.java | 67 private MediaProjection.Callback mCallback = null; field in MediaProjectionSDK34Test 80 if (mCallback != null) { in cleanup() 81 mMediaProjection.unregisterCallback(mCallback); in cleanup() 95 mCallback = new MediaProjection.Callback() { in testCreateVirtualDisplay_withoutCallback_throwsException() 101 mMediaProjection.registerCallback(mCallback, new Handler(Looper.getMainLooper())); in testCreateVirtualDisplay_withoutCallback_throwsException() 137 mCallback = new MediaProjection.Callback() { in testCreateVirtualDisplay_reusedResultData_throwsException() 143 anotherProjection.registerCallback(mCallback, new Handler(Looper.getMainLooper())); in testCreateVirtualDisplay_reusedResultData_throwsException() 172 mCallback = new MediaProjection.Callback() { in testCreateVirtualDisplay_reusedMediaProjection_throwsException() 178 mMediaProjection.registerCallback(mCallback, new Handler(Looper.getMainLooper())); in testCreateVirtualDisplay_reusedMediaProjection_throwsException()
|
/cts/tests/tests/broadcastradio/src/android/broadcastradio/cts/ |
D | RadioTunerTest.java | 63 mExpect.withMessage("Error callbacks").that(mCallback.errorCount).isEqualTo(0); in close_twice() 147 .that(mCallback.waitForProgramInfoChangeCallback(TUNE_CALLBACK_TIMEOUT_MS)) in step_withDownDirection() 162 .that(mCallback.waitForProgramInfoChangeCallback(TUNE_CALLBACK_TIMEOUT_MS)) in step_withUpDirection() 179 index).that(mCallback.waitForProgramInfoChangeCallback( in step_withMultipleTimes() 196 .that(mCallback.waitForProgramInfoChangeCallback(TUNE_CALLBACK_TIMEOUT_MS)) in seek_onProgramInfoChangedInvoked() 213 .that(mCallback.waitForProgramInfoChangeCallback(TUNE_CALLBACK_TIMEOUT_MS)) in tune_withFmSelector_onProgramInfoChangedInvoked() 216 .that(mCallback.currentProgramInfo.getSelector()).isEqualTo(sel); in tune_withFmSelector_onProgramInfoChangedInvoked() 226 mCallback.waitForProgramInfoChangeCallback(CANCEL_TIMEOUT_MS); in cancel_afterNoOperations() 230 .that(mCallback.tunerFailureResult).isNotEqualTo(RadioTuner.TUNER_RESULT_CANCELED); in cancel_afterNoOperations() 242 .that(mCallback.waitForProgramInfoChangeCallback(TUNE_CALLBACK_TIMEOUT_MS)) in cancel_afterStepCompletes() [all …]
|
/cts/apps/CtsVerifier/src/org/hyphonate/megaaudio/recorder/sinks/ |
D | AppCallbackAudioSink.java | 23 private AppCallback mCallback; field in AppCallbackAudioSink 26 mCallback = callback; in AppCallbackAudioSink() 31 mCallback.onDataReady(audioData, numFrames); in push()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | DynamicSensorDiscoveryTestActivity.java | 53 private Callback mCallback; field in DynamicSensorDiscoveryTestActivity 86 mCallback = new Callback(); in activitySetUp() 87 mSensorManager.registerDynamicSensorCallback(mCallback); in activitySetUp() 98 Assert.assertTrue("Cannot detect sensor connection.", mCallback.waitForConnection(null)); in test0_OnConnect() 100 mSensorId = mCallback.getSensorId(); in test0_OnConnect() 114 mCallback.isSensorInList()); in test1_DynamicSensorList() 117 mCallback.isSensorInListOfSpecificType()); in test1_DynamicSensorList() 131 Assert.assertTrue("Failed to receive sensor events", mCallback.waitForSensorEvent()); in test2_SensorOperation() 143 Assert.assertTrue("Cannot detect sensor disconnection.", mCallback.waitForDisconnection()); in test3_OnDisconnect() 158 mCallback.waitForConnection(mSensorId)); in test4_OnReconnect() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/ |
D | ScreenRecordingCallbackTests.java | 97 final TestableScreenRecordingCallback mCallback = new TestableScreenRecordingCallback(); field in ScreenRecordingCallbackTests.ScreenRecordingCallbackActivity 103 mCallback); in onStart() 104 mCallback.accept(initialState); in onStart() 110 getWindowManager().removeScreenRecordingCallback(mCallback); in onStop() 178 + " starts", SCREEN_RECORDING_STATE_NOT_VISIBLE, activity.mCallback.getState()); in testFullDisplayMediaProjectionStartsAfterActivity() 182 + " projection", SCREEN_RECORDING_STATE_VISIBLE, activity.mCallback.getState()); in testFullDisplayMediaProjectionStartsAfterActivity() 186 + " projection", SCREEN_RECORDING_STATE_NOT_VISIBLE, activity.mCallback.getState()); in testFullDisplayMediaProjectionStartsAfterActivity() 188 assertTrue(activity.mCallback.queueEmpty()); in testFullDisplayMediaProjectionStartsAfterActivity() 206 SCREEN_RECORDING_STATE_VISIBLE, activity.mCallback.getState()); in testFullDisplayMediaProjectionStartsBeforeActivity() 210 + " projection", SCREEN_RECORDING_STATE_NOT_VISIBLE, activity.mCallback.getState()); in testFullDisplayMediaProjectionStartsBeforeActivity() [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | SimpleActivity.java | 30 private IBinder mCallback; field in SimpleActivity 41 mCallback = extras.getBinder(CommandReceiver.EXTRA_CALLBACK); in onCreate() 55 if (mCallback != null) { in onTrimMemory() 60 mCallback.transact(IBinder.FIRST_CALL_TRANSACTION, data, reply, 0); in onTrimMemory()
|
/cts/tests/app/CantSaveState1/src/com/android/test/cantsavestate2/ |
D | CantSave1Activity.java | 31 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/tests/devicestate/src/android/hardware/devicestate/cts/ |
D | DeviceStateRequestSession.java | 37 private final DeviceStateRequest.Callback mCallback; field in DeviceStateRequestSession 46 mCallback = callback; in DeviceStateRequestSession() 56 mCallback)); in submitRequest() 59 mDeviceStateManager.requestState(mRequest, Runnable::run, mCallback)); in submitRequest()
|
/cts/tests/tests/telephony/current/src/android/telephony/euicc/cts/ |
D | EuiccServiceTest.java | 90 private IMockEuiccServiceCallback mCallback; field in EuiccServiceTest 186 mCallback = new MockEuiccServiceCallback(); in setUp() 187 MockEuiccService.setCallback(mCallback); in setUp() 205 mCallback.reset(); in tearDown() 251 assertTrue(mCallback.isMethodCalled()); in testOnGetEid() 281 assertTrue(mCallback.isMethodCalled()); in testOnGetAvailableMemoryInBytes_onSuccess() 311 assertTrue(mCallback.isMethodCalled()); in testOnGetAvailableMemoryInBytes_onUnsupportedOperationException() 334 assertTrue(mCallback.isMethodCalled()); in testOnGetOtaStatus() 364 assertTrue(mCallback.isMethodCalled()); in testOnGetDownloadableSubscriptionMetadata() 394 assertTrue(mCallback.isMethodCalled()); in testOnGetDownloadableSubscriptionMetadataWithPortIndex() [all …]
|