/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | VibratorControllerTest.java | 70 @Mock private VibratorController.NativeWrapper mNativeWrapperMock; field in VibratorControllerTest 89 return new VibratorController(VIBRATOR_ID, mOnCompleteListenerMock, mNativeWrapperMock); in createController() 96 verify(mNativeWrapperMock).init(eq(VIBRATOR_ID), notNull()); in createController_initializesNativeWrapper() 101 when(mNativeWrapperMock.isAvailable()).thenReturn(true); in isAvailable_withVibratorHalPresent_returnsTrue() 107 when(mNativeWrapperMock.isAvailable()).thenReturn(false); in isAvailable_withNoVibratorHalPresent_returnsFalse() 138 InOrder inOrderVerifier = inOrder(mNativeWrapperMock); in setExternalControl_withCapability_enablesExternalControl() 139 inOrderVerifier.verify(mNativeWrapperMock).setExternalControl(eq(true)); in setExternalControl_withCapability_enablesExternalControl() 140 inOrderVerifier.verify(mNativeWrapperMock).setExternalControl(eq(false)); in setExternalControl_withCapability_enablesExternalControl() 151 verify(mNativeWrapperMock, never()).setExternalControl(anyBoolean()); in setExternalControl_withNoCapability_ignoresExternalControl() 161 verify(mNativeWrapperMock).alwaysOnEnable( in updateAlwaysOn_withCapability_enablesAlwaysOnEffect() [all …]
|
D | VibratorManagerServiceTest.java | 165 private VibratorManagerService.NativeWrapper mNativeWrapperMock; field in VibratorManagerServiceTest 294 return mNativeWrapperMock; in createService() 357 verify(mNativeWrapperMock).init(any()); in createService_initializesNativeManagerServiceAndVibrators() 400 when(mNativeWrapperMock.getVibratorIds()).thenReturn(null); in getVibratorIds_withNullResultFromNative_returnsEmptyArray() 1262 verify(mNativeWrapperMock).init(listenerCaptor.capture()); in vibrate_withriggerCallback_finishesVibration() 1266 when(mNativeWrapperMock.prepareSynced(eq(new int[]{1, 2}))).thenReturn(true); in vibrate_withriggerCallback_finishesVibration() 1267 when(mNativeWrapperMock.triggerSynced(anyLong())).then(answer -> { in vibrate_withriggerCallback_finishesVibration() 1282 verify(mNativeWrapperMock).prepareSynced(eq(new int[]{1, 2})); in vibrate_withriggerCallback_finishesVibration() 1283 verify(mNativeWrapperMock).triggerSynced(anyLong()); in vibrate_withriggerCallback_finishesVibration() 1300 when(mNativeWrapperMock.prepareSynced(eq(new int[]{1, 2}))).thenReturn(true); in vibrate_withMultipleVibratorsAndCapabilities_prepareAndTriggerCalled() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/hint/ |
D | HintManagerServiceTest.java | 141 private HintManagerService.NativeWrapper mNativeWrapperMock; field in HintManagerServiceTest 177 when(mNativeWrapperMock.halGetHintSessionPreferredRate()) 179 when(mNativeWrapperMock.halCreateHintSession(eq(TGID), eq(UID), eq(SESSION_TIDS_A), 181 when(mNativeWrapperMock.halCreateHintSession(eq(TGID), eq(UID), eq(SESSION_TIDS_B), 183 when(mNativeWrapperMock.halCreateHintSession(eq(TGID), eq(UID), eq(SESSION_TIDS_C), 185 when(mNativeWrapperMock.halCreateHintSessionWithConfig(eq(TGID), eq(UID), 189 when(mNativeWrapperMock.halCreateHintSessionWithConfig(eq(TGID), eq(UID), 193 when(mNativeWrapperMock.halCreateHintSessionWithConfig(eq(TGID), eq(UID), 208 reset(mNativeWrapperMock); 209 when(mNativeWrapperMock.halGetHintSessionPreferredRate()) [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/companion/virtual/ |
D | InputManagerMockHelper.java | 49 private final InputController.NativeWrapper mNativeWrapperMock; field in InputManagerMockHelper 63 mNativeWrapperMock = nativeWrapperMock; in InputManagerMockHelper() 66 doAnswer(this::handleNativeOpenInputDevice).when(mNativeWrapperMock).openUinputMouse( in InputManagerMockHelper() 68 doAnswer(this::handleNativeOpenInputDevice).when(mNativeWrapperMock).openUinputDpad( in InputManagerMockHelper() 70 doAnswer(this::handleNativeOpenInputDevice).when(mNativeWrapperMock).openUinputKeyboard( in InputManagerMockHelper() 72 doAnswer(this::handleNativeOpenInputDevice).when(mNativeWrapperMock).openUinputTouchscreen( in InputManagerMockHelper()
|
D | InputControllerTest.java | 65 private InputController.NativeWrapper mNativeWrapperMock; field in InputControllerTest 76 TestableLooper.get(this), mNativeWrapperMock, mIInputManagerMock); in setUp() 88 mInputController = new InputController(mNativeWrapperMock, in setUp() 139 verify(mNativeWrapperMock).openUinputMouse(eq("name"), eq(1), eq(1), anyString()); in unregisterInputDevice_allMiceUnregistered_clearPointerDisplayId() 149 verify(mNativeWrapperMock).openUinputMouse(eq("mouse1"), eq(1), eq(1), anyString()); in unregisterInputDevice_anotherMouseExists_setPointerDisplayIdOverride() 153 verify(mNativeWrapperMock).openUinputMouse(eq("mouse2"), eq(1), eq(1), anyString()); in unregisterInputDevice_anotherMouseExists_setPointerDisplayIdOverride()
|
D | VirtualDeviceManagerServiceTest.java | 244 private InputController.NativeWrapper mNativeWrapperMock; field in VirtualDeviceManagerServiceTest 371 when(mNativeWrapperMock.writeButtonEvent(anyLong(), anyInt(), anyInt(), anyLong())) in setUp() 373 when(mNativeWrapperMock.writeRelativeEvent(anyLong(), anyFloat(), anyFloat(), anyLong())) in setUp() 375 when(mNativeWrapperMock.writeScrollEvent(anyLong(), anyFloat(), anyFloat(), anyLong())) in setUp() 377 when(mNativeWrapperMock.writeKeyEvent(anyLong(), anyInt(), anyInt(), anyLong())) in setUp() 379 when(mNativeWrapperMock.writeTouchEvent(anyLong(), anyInt(), anyInt(), anyInt(), in setUp() 384 TestableLooper.get(this), mNativeWrapperMock, mIInputManagerMock); in setUp() 387 mInputController = new InputController(mNativeWrapperMock, in setUp() 1138 verify(mNativeWrapperMock).openUinputDpad(eq(DEVICE_NAME_1), eq(VENDOR_ID), eq(PRODUCT_ID), in createVirtualDpad_hasDisplay_obtainFileDescriptor() 1148 verify(mNativeWrapperMock).openUinputKeyboard(eq(DEVICE_NAME_1), eq(VENDOR_ID), in createVirtualKeyboard_hasDisplay_obtainFileDescriptor() [all …]
|
/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/ |
D | PowerManagerServiceTest.java | 172 @Mock private PowerManagerService.NativeWrapper mNativeWrapperMock; field in PowerManagerServiceTest 295 return mNativeWrapperMock; in createService() 506 verify(mNativeWrapperMock).nativeInit(same(service)); in testCreateService_initializesNativeServiceAndSetsPowerModes() 507 verify(mNativeWrapperMock).nativeSetPowerMode(eq(Mode.INTERACTIVE), eq(true)); in testCreateService_initializesNativeServiceAndSetsPowerModes() 508 verify(mNativeWrapperMock).nativeSetPowerMode(eq(Mode.DOUBLE_TAP_TO_WAKE), eq(false)); in testCreateService_initializesNativeServiceAndSetsPowerModes() 1038 when(mNativeWrapperMock.nativeForceSuspend()).then(inv -> { in testForceSuspend_putsDeviceToSleep() 1087 when(mNativeWrapperMock.nativeForceSuspend()).then(inv -> { in testForceSuspend_wakeLocksDisabled() 1103 when(mNativeWrapperMock.nativeForceSuspend()).thenReturn(false); in testForceSuspend_forceSuspendFailurePropagated() 1274 }).when(mNativeWrapperMock).nativeReleaseSuspendBlocker(any()); in testSetDozeOverrideFromDreamManager_triggersSuspendBlocker() 1281 }).when(mNativeWrapperMock).nativeAcquireSuspendBlocker(any()); in testSetDozeOverrideFromDreamManager_triggersSuspendBlocker() [all …]
|
D | NotifierTest.java | 75 @Mock private PowerManagerService.NativeWrapper mNativeWrapperMock; field in NotifierTest 301 return mNativeWrapperMock;
|