Home
last modified time | relevance | path

Searched refs:mVibrator (Results 1 – 25 of 30) sorted by relevance

12

/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/
DFullScreenMagnificationVibrationHelper.java38 private final Vibrator mVibrator; field in FullScreenMagnificationVibrationHelper
47 mVibrator = context.getSystemService(Vibrator.class); in FullScreenMagnificationVibrationHelper()
49 () -> mVibrator != null && mVibrator.areAllEffectsSupported( in FullScreenMagnificationVibrationHelper()
55 if (mVibrator != null && mVibrator.hasVibrator() && isEdgeHapticSettingEnabled()) { in vibrateIfSettingEnabled()
57 mVibrator.vibrate(mVibrationEffect); in vibrateIfSettingEnabled()
59 mVibrator.vibrate(VibrationEffect.createOneShot(VIBRATION_DURATION_MS, in vibrateIfSettingEnabled()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DVibratorHelper.java47 private final Vibrator mVibrator; field in VibratorHelper
74 mVibrator = vibrator; in VibratorHelper()
85 mVibrator.vibrate(VibrationEffect.get(effectId, false /* fallback */), in vibrate()
97 mExecutor.execute(() -> mVibrator.vibrate(uid, opPkg, vibe, reason, attributes)); in vibrate()
107 mExecutor.execute(() -> mVibrator.vibrate(effect, attributes)); in vibrate()
117 mExecutor.execute(() -> mVibrator.vibrate(effect)); in vibrate()
127 mExecutor.execute(() -> mVibrator.vibrate(effect, attributes)); in vibrate()
134 return mVibrator != null && mVibrator.hasVibrator(); in hasVibrator()
144 mExecutor.execute(mVibrator::cancel); in cancel()
170 return mVibrator.getPrimitiveDurations(primitiveIds); in getPrimitiveDurations()
/frameworks/base/apct-tests/perftests/core/src/android/os/
DVibratorPerfTest.java37 private Vibrator mVibrator; field in VibratorPerfTest
42 mVibrator = context.getSystemService(Vibrator.class); in setUp()
49 mVibrator.vibrate(VibrationEffect.createPredefined(VibrationEffect.EFFECT_CLICK)); in testEffectClick()
57 mVibrator.vibrate(VibrationEffect.createOneShot(SECONDS.toMillis(2), in testOneShot()
67 mVibrator.vibrate(VibrationEffect.createWaveform(timings, -1)); in testWaveform()
75 mVibrator.vibrate( in testCompose()
88 mVibrator.areEffectsSupported(effects); in testAreEffectsSupported()
98 mVibrator.arePrimitivesSupported(primitives); in testArePrimitivesSupported()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DVibratorHelperTest.java48 @Mock private Vibrator mVibrator; field in VibratorHelperTest
55 getContext().addMockSystemService(Vibrator.class, mVibrator); in setUp()
90 when(mVibrator.hasFrequencyControl()).thenReturn(false); in createVibration_insistent_createsRepeatingVibration()
94 when(mVibrator.hasFrequencyControl()).thenReturn(true); in createVibration_insistent_createsRepeatingVibration()
101 when(mVibrator.hasFrequencyControl()).thenReturn(false); in createVibration_nonInsistent_createsSingleShotVibration()
105 when(mVibrator.hasFrequencyControl()).thenReturn(true); in createVibration_nonInsistent_createsSingleShotVibration()
DNotificationAttentionHelperTest.java134 @Mock Vibrator mVibrator; field in NotificationAttentionHelperTest
193 getContext().addMockSystemService(Vibrator.class, mVibrator); in setUp()
207 when(mVibrator.hasFrequencyControl()).thenReturn(false); in setUp()
570 verify(mVibrator, never()).vibrate(anyInt(), anyString(), any(), anyString(), in verifyNeverVibrate()
596 verify(mVibrator, after(MAX_VIBRATION_DELAY).never()).vibrate(anyInt(), anyString(), any(), in verifyDelayedNeverVibrate()
604 verify(mVibrator, verification).vibrate(eq(Process.SYSTEM_UID), in verifyVibrate()
614 verify(mVibrator, times(1)).cancel(eq(alarmClassUsageFilter)); in verifyStopVibrate()
618 verify(mVibrator, never()).cancel(); in verifyNeverStopVibrate()
619 verify(mVibrator, never()).cancel(anyInt()); in verifyNeverStopVibrate()
1121 Mockito.reset(mVibrator); in testVibrateTwice()
[all …]
DNotificationComparatorTest.java80 @Mock Vibrator mVibrator; field in NotificationComparatorTest
121 when(mMockContext.getSystemService(Vibrator.class)).thenReturn(mVibrator); in setUp()
DRankingHelperTest.java94 @Mock Vibrator mVibrator; field in RankingHelperTest
140 when(mContext.getSystemService(Vibrator.class)).thenReturn(mVibrator); in setUp()
/frameworks/base/services/core/java/com/android/server/notification/
DVibratorHelper.java48 private final Vibrator mVibrator; field in VibratorHelper
56 mVibrator = context.getSystemService(Vibrator.class); in VibratorHelper()
155 mVibrator.vibrate(Process.SYSTEM_UID, PackageManagerService.PLATFORM_PACKAGE_NAME, in vibrate()
163 mVibrator.cancel(usageFilter); in cancelVibration()
172 if (mVibrator.hasFrequencyControl()) { in createFallbackVibration()
187 if (mVibrator.hasFrequencyControl()) { in createDefaultVibration()
198 return mVibrator.areVibrationFeaturesSupported(effect); in areEffectComponentsSupported()
/frameworks/base/services/tests/powerservicetests/src/com/android/server/power/
DNotifierTest.java81 @Mock private Vibrator mVibrator; field in NotifierTest
105 when(mContextSpy.getSystemService(Vibrator.class)).thenReturn(mVibrator); in setUp()
123 verify(mVibrator, times(1)).vibrate(anyInt(), any(), any(), any(), in testVibrateEnabled_wiredCharging()
140 verifyZeroInteractions(mVibrator); in testVibrateDisabled_wiredCharging()
156 verify(mVibrator, times(1)).vibrate(anyInt(), any(), any(), any(), in testVibrateEnabled_wirelessCharging()
173 verifyZeroInteractions(mVibrator); in testVibrateDisabled_wirelessCharging()
192 verify(mVibrator, never()).vibrate(any(), any(VibrationAttributes.class)); in testVibrateEnabled_dndOn()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/
DFaceDetectClientTest.java93 private Vibrator mVibrator; field in FaceDetectClientTest
124 mContext.addMockSystemService(Vibrator.class, mVibrator); in setup()
175 verifyZeroInteractions(mVibrator); in doesNotPlayHapticOnInteractionDetected()
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/
DNotificationTestList.java51 Vibrator mVibrator; field in NotificationTestList
76 mVibrator = (Vibrator)getSystemService(VIBRATOR_SERVICE); in onCreate()
852 mVibrator.vibrate(new long[] { 250, 1000, 500, 2000 }, -1);
859 mVibrator.vibrate(new long[] { 250, 1000, 500 }, 1);
866 mVibrator.vibrate(3000);
873 mVibrator.vibrate(100000);
880 mVibrator.cancel();
/frameworks/base/core/java/android/view/
DInputDevice.java102 private Vibrator mVibrator; // guarded by mMotionRanges during initialization field in InputDevice
1244 if (mVibrator == null) { in getVibrator()
1246 mVibrator = InputManagerGlobal.getInstance() in getVibrator()
1250 mVibrator = NullVibrator.getInstance(); in getVibrator()
1253 return mVibrator; in getVibrator()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DCentralSurfacesCommandQueueCallbacksTest.java99 @Mock private Vibrator mVibrator; field in CentralSurfacesCommandQueueCallbacksTest
137 Optional.of(mVibrator), in setup()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/volume/
DVolumeDialogControllerImplTest.java90 private VibratorHelper mVibrator; field in VolumeDialogControllerImplTest
129 mNotificationManager, mVibrator, mIAudioService, mAccessibilityManager, in setup()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DLegacyLockIconViewControllerTest.java362 verify(mVibrator).performHapticFeedback(any(), eq(HapticFeedbackConstants.CONTEXT_CLICK)); in playHaptic_onTouchExploration_performHapticFeedback()
371 verify(mVibrator).performHapticFeedback(any(), eq(UdfpsController.LONG_PRESS)); in playHaptic_onLongPress_performHapticFeedback()
DLegacyLockIconViewControllerBaseTest.java97 protected @Mock VibratorHelper mVibrator; field in LegacyLockIconViewControllerBaseTest
172 mVibrator, in setUp()
/frameworks/base/core/java/com/android/internal/widget/
DSlidingTab.java76 private Vibrator mVibrator; field in SlidingTab
834 if (mVibrator == null) {
835 mVibrator = getContext().getSystemService(Vibrator.class);
837 mVibrator.vibrate(
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DLegacyLockIconViewController.java126 @NonNull private final VibratorHelper mVibrator; field in LegacyLockIconViewController
221 mVibrator = vibrator; in LegacyLockIconViewController()
793 mVibrator.performHapticFeedback( in vibrateOnTouchExploration()
801 mVibrator.performHapticFeedback(mView, UdfpsController.LONG_PRESS); in vibrateOnLongPress()
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/
DVibratorManagerServiceTest.java192 private FakeVibrator mVibrator; field in VibratorManagerServiceTest
212 mVibrator = new FakeVibrator(mContextSpy); in setUp()
213 when(mContextSpy.getSystemService(eq(Context.VIBRATOR_SERVICE))).thenReturn(mVibrator); in setUp()
1210 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM)); in vibrate_withInputDevices_vibratesInputDevices()
1254 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM)); in vibrate_withriggerCallback_finishesVibration()
1522 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_NOTIFICATION); in vibrate_withIntensitySettings_appliesSettingsToScaleVibrations()
1530 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_TOUCH); in vibrate_withIntensitySettings_appliesSettingsToScaleVibrations()
1538 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM)); in vibrate_withIntensitySettings_appliesSettingsToScaleVibrations()
1590 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_TOUCH);
1622 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM));
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DUdfpsController.java160 @NonNull private final VibratorHelper mVibrator; field in UdfpsController
737 mVibrator = vibrator; in UdfpsController()
822 mVibrator.performHapticFeedback( in playStartHaptic()
935 mVibrator.performHapticFeedback( in onAodInterrupt()
/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/
DAccessibilityShortcutControllerTest.java132 private @Mock Vibrator mVibrator; field in AccessibilityShortcutControllerTest
147 when(mVibrator.hasVibrator()).thenReturn(true); in setUp()
151 when(mContext.getSystemService(Context.VIBRATOR_SERVICE)).thenReturn(mVibrator); in setUp()
358 verify(mVibrator).vibrate(aryEq(VIBRATOR_PATTERN_LONG), eq(-1), anyObject()); in testOnAccessibilityShortcut_vibrates()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/biometrics/
DUdfpsControllerTest.java177 private VibratorHelper mVibrator; field in UdfpsControllerTest
347 mVibrator, in initUdfpsController()
1105 verify(mVibrator).performHapticFeedback( in playHapticOnTouchUdfpsArea_a11yTouchExplorationEnabled()
1125 verify(mVibrator, never()).performHapticFeedback(any(), anyInt()); in noHapticOnTouchUdfpsArea_a11yTouchExplorationDisabled()
1432 verify(mVibrator).performHapticFeedback(any(), eq(UdfpsController.LONG_PRESS)); in playHaptic_onAodInterrupt_onAcquiredBad_performHapticFeedback()
/frameworks/base/services/tests/wmtests/src/com/android/server/policy/
DTestPhoneWindowManager.java150 @Mock private Vibrator mVibrator; field in TestPhoneWindowManager
326 doReturn(mVibratorInfo).when(mVibrator).getInfo(); in setUp()
327 doReturn(mVibrator).when(mContext).getSystemService(eq(Context.VIBRATOR_SERVICE)); in setUp()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java139 private final Vibrator mVibrator; field in Notifier
214 mVibrator = mContext.getSystemService(Vibrator.class); in Notifier()
997 mVibrator.vibrate(Process.SYSTEM_UID, mContext.getOpPackageName(), in playChargingStartedFeedback()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumeDialogControllerImpl.java147 private final VibratorHelper mVibrator; field in VolumeDialogControllerImpl
214 mVibrator = vibrator; in VolumeDialogControllerImpl()
215 mHasVibrator = mVibrator.hasVibrator(); in VolumeDialogControllerImpl()
413 mVibrator.vibrate(effect, SONIFICIATION_VIBRATION_ATTRIBUTES); in vibrate()

12