/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | VibratorWrapper.java | 77 private final Vibrator mVibrator; field in VibratorWrapper 86 mVibrator = context.getSystemService(Vibrator.class); in VibratorWrapper() 87 mHasVibrator = mVibrator.hasVibrator(); in VibratorWrapper() 96 if (Utilities.ATLEAST_S && mVibrator.areAllPrimitivesSupported( in VibratorWrapper() 111 int primitiveDuration = mVibrator.getPrimitiveDurations( in VibratorWrapper() 176 UI_HELPER_EXECUTOR.execute(mVibrator::cancel); in cancelVibrate() 184 UI_HELPER_EXECUTOR.execute(() -> mVibrator.vibrate(vibrationEffect, VIBRATION_ATTRS)); in vibrate() 196 if (primitiveId >= 0 && mVibrator.areAllPrimitivesSupported(primitiveId)) { in vibrate() 197 mVibrator.vibrate(VibrationEffect.startComposition() in vibrate() 201 mVibrator.vibrate(fallbackEffect, VIBRATION_ATTRS); in vibrate() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | RingerModeAffectedVolumePreferenceController.java | 46 protected Vibrator mVibrator; field in RingerModeAffectedVolumePreferenceController 54 mVibrator = mContext.getSystemService(Vibrator.class); in RingerModeAffectedVolumePreferenceController() 55 if (mVibrator != null && !mVibrator.hasVibrator()) { in RingerModeAffectedVolumePreferenceController() 56 mVibrator = null; in RingerModeAffectedVolumePreferenceController() 94 mVibrator = vibrator; in setVibrator() 152 if (mVibrator == null && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { in getEffectiveRingerMode()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | AudioAndHapticFeedbackManager.java | 36 private Vibrator mVibrator; field in AudioAndHapticFeedbackManager 58 mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); in initInternal() 68 return mVibrator != null && mVibrator.hasVibrator(); in hasVibrator() 72 if (mVibrator == null) { in vibrate() 75 mVibrator.vibrate(milliseconds); in vibrate()
|
/packages/apps/Settings/src/com/android/settings/notification/app/ |
D | VibrationPreferenceController.java | 34 private final Vibrator mVibrator; field in VibrationPreferenceController 38 mVibrator = context.getSystemService(Vibrator.class); in VibrationPreferenceController() 53 && mVibrator != null in isAvailable() 54 && mVibrator.hasVibrator(); in isAvailable()
|
/packages/services/Telephony/src/com/android/services/telephony/ |
D | EmergencyTonePlayer.java | 53 private final Vibrator mVibrator; field in EmergencyTonePlayer 62 mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); in EmergencyTonePlayer() 92 mVibrator.vibrate(VIBRATE_PATTERN, 0, VIBRATION_ATTRIBUTES); in startVibrate() 99 mVibrator.cancel(); in stopVibrate()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/ |
D | AllSetActivity.java | 112 @Nullable private Vibrator mVibrator; field in AllSetActivity 179 mVibrator = getSystemService(Vibrator.class); in onCreate() 205 if (!Utilities.ATLEAST_S || mVibrator == null) { in startBackgroundAnimation() 208 boolean supportsThud = mVibrator.areAllPrimitivesSupported( in startBackgroundAnimation() 211 if (!supportsThud && !mVibrator.areAllPrimitivesSupported( in startBackgroundAnimation() 228 runOnUiHelperThread(() -> mVibrator.vibrate(vibrationEffect)); in startBackgroundAnimation() 233 runOnUiHelperThread(() -> mVibrator.vibrate(vibrationEffect)); in startBackgroundAnimation() 238 runOnUiHelperThread(mVibrator::cancel); in startBackgroundAnimation() 243 runOnUiHelperThread(mVibrator::cancel); in startBackgroundAnimation()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | VibrationPreferenceControllerTest.java | 55 @Mock private Vibrator mVibrator; field in VibrationPreferenceControllerTest 68 when(mContext.getSystemService(Context.VIBRATOR_SERVICE)).thenReturn(mVibrator); in setUp() 69 when(mVibrator.hasVibrator()).thenReturn(true); in setUp() 80 when(mVibrator.hasVibrator()).thenReturn(false); in getAvailabilityStatus_noVibrator_returnUnsupportedOnDevice() 88 when(mVibrator.hasVibrator()).thenReturn(true); in getAvailabilityStatus_withVibrator_returnAvailable()
|
D | NotificationVibrationTogglePreferenceControllerTest.java | 55 private Vibrator mVibrator; field in NotificationVibrationTogglePreferenceControllerTest 66 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 148 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_NOTIFICATION)); in setChecked_updatesIntensityAndDependentSettings()
|
D | AlarmVibrationTogglePreferenceControllerTest.java | 54 private Vibrator mVibrator; field in AlarmVibrationTogglePreferenceControllerTest 65 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 139 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM)); in setChecked_updatesIntensityAndDependentSettings()
|
D | VibrationTogglePreferenceControllerTest.java | 68 private Vibrator mVibrator; field in VibrationTogglePreferenceControllerTest 77 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 159 .isEqualTo(mVibrator.getDefaultVibrationIntensity(VIBRATION_USAGE)); in setProgress_updatesCheckedState()
|
D | VibrationIntensityPreferenceControllerTest.java | 72 private Vibrator mVibrator; field in VibrationIntensityPreferenceControllerTest 80 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 89 .isEqualTo(mVibrator.getDefaultVibrationIntensity(VIBRATION_USAGE)); in missingSetting_shouldReturnDefault() 229 int defaultIntensity = mVibrator.getDefaultVibrationIntensity(VIBRATION_USAGE); in setProgress_oneSupportedPosition_updatesOnPositionsToDeviceDefault()
|
D | MediaVibrationTogglePreferenceControllerTest.java | 60 private Vibrator mVibrator; field in MediaVibrationTogglePreferenceControllerTest 71 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 150 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_MEDIA)); in setChecked_updatesIntensityAndDependentSettings()
|
D | NotificationVibrationIntensityPreferenceControllerTest.java | 57 private Vibrator mVibrator; field in NotificationVibrationIntensityPreferenceControllerTest 68 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 93 mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_NOTIFICATION)); in missingSetting_shouldReturnDefault()
|
D | HapticFeedbackTogglePreferenceControllerTest.java | 56 private Vibrator mVibrator; field in HapticFeedbackTogglePreferenceControllerTest 67 mVibrator = mContext.getSystemService(Vibrator.class); in setUp() 161 .isEqualTo(mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_TOUCH)); in setChecked_updatesIntensityAndDependentSettings()
|
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/ |
D | CellBroadcastSearchIndexableProviderTest.java | 70 Vibrator mVibrator; field in CellBroadcastSearchIndexableProviderTest 78 doReturn(mVibrator).when(mContext).getSystemService("test"); in testQueryNonIndexableKeys() 79 doReturn(true).when(mVibrator).hasVibrator(); in testQueryNonIndexableKeys() 96 doReturn(false).when(mVibrator).hasVibrator(); in testQueryNonIndexableKeys()
|
/packages/apps/Settings/src/com/android/settings/biometrics2/ui/widget/ |
D | UdfpsEnrollProgressBarDrawable.java | 85 private final Vibrator mVibrator; field in UdfpsEnrollProgressBarDrawable 159 mVibrator = mContext.getSystemService(Vibrator.class); in UdfpsEnrollProgressBarDrawable() 206 if (mVibrator != null && mIsAccessibilityEnabled) { in updateProgress() 207 mVibrator.vibrate(Process.myUid(), mContext.getOpPackageName(), in updateProgress() 215 if (mVibrator != null) { in updateProgress() 217 mVibrator.vibrate(Process.myUid(), mContext.getOpPackageName(), in updateProgress() 222 mVibrator.vibrate(Process.myUid(), in updateProgress()
|
/packages/apps/Settings/src/com/android/settings/biometrics/fingerprint/ |
D | UdfpsEnrollProgressBarDrawable.java | 85 private final Vibrator mVibrator; field in UdfpsEnrollProgressBarDrawable 159 mVibrator = mContext.getSystemService(Vibrator.class); in UdfpsEnrollProgressBarDrawable() 207 if (mVibrator != null && mIsAccessibilityEnabled) { in updateProgress() 208 mVibrator.vibrate(Process.myUid(), mContext.getOpPackageName(), in updateProgress() 216 if (mVibrator != null) { in updateProgress() 218 mVibrator.vibrate(Process.myUid(), mContext.getOpPackageName(), in updateProgress() 223 mVibrator.vibrate(Process.myUid(), in updateProgress()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | RingVolumePreferenceControllerTest.java | 57 private Vibrator mVibrator; field in RingVolumePreferenceControllerTest 77 shadowContext.setSystemService(Context.VIBRATOR_SERVICE, mVibrator); in setUp() 158 when(mVibrator.hasVibrator()).thenReturn(true); in setRingerModeToVibrate_VibratorAvailable_iconIsVibrate() 161 mController.setVibrator(mVibrator); in setRingerModeToVibrate_VibratorAvailable_iconIsVibrate()
|
/packages/apps/Settings/src/com/android/settings/accessibility/ |
D | KeyboardVibrationTogglePreferenceController.java | 63 private final Vibrator mVibrator; field in KeyboardVibrationTogglePreferenceController 72 mVibrator = context.getSystemService(Vibrator.class); in KeyboardVibrationTogglePreferenceController() 142 VibrationPreferenceConfig.playVibrationPreview(mVibrator, keyboardAttrs); in setChecked() 159 mVibrator.isDefaultKeyboardVibrationEnabled() ? ON : OFF) == ON; in isKeyboardVibrationSwitchEnabled()
|
D | VibrationMainSwitchPreferenceController.java | 47 private final Vibrator mVibrator; field in VibrationMainSwitchPreferenceController 51 mVibrator = context.getSystemService(Vibrator.class); in VibrationMainSwitchPreferenceController() 96 mVibrator, VibrationAttributes.USAGE_TOUCH); in setChecked()
|
D | VibrationPreferenceConfig.java | 57 private final Vibrator mVibrator; field in VibrationPreferenceConfig 89 mVibrator = context.getSystemService(Vibrator.class); in VibrationPreferenceConfig() 94 mDefaultIntensity = mVibrator.getDefaultVibrationIntensity(vibrationUsage); in VibrationPreferenceConfig() 140 mVibrator.vibrate(PREVIEW_VIBRATION_EFFECT, mPreviewVibrationAttributes); in playVibrationPreview()
|
/packages/apps/EmergencyInfo/EmergencyGestureAction/src/com/android/emergency/action/service/ |
D | EmergencyActionForegroundService.java | 63 private Vibrator mVibrator; field in EmergencyActionForegroundService 73 mVibrator = getSystemService(Vibrator.class); in onCreate() 104 mVibrator.vibrate(VIBRATION_EFFECT); in onStartCommand() 117 mVibrator.cancel(); in onDestroy()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | Ringer.java | 185 private final Vibrator mVibrator; field in Ringer 244 mVibrator = vibrator; in Ringer() 254 mContext, mVibrator, mVibrationEffectProxy, featureFlags); in Ringer() 440 mVibrator.hasVibrator(), in startRinging() 545 mVibrator.hasVibrator(), mSystemSettingsUtil.isRingVibrationEnabled(mContext), in vibrateIfNeeded() 548 mVibrator.vibrate(effect, VIBRATION_ATTRIBUTES); in vibrateIfNeeded() 627 mVibrator.cancel(); in stopRinging() 695 return mVibrator.hasVibrator() in isVibratorEnabled()
|
/packages/apps/Settings/src/com/android/settings/biometrics2/ui/viewmodel/ |
D | FingerprintEnrollEnrollingViewModel.java | 86 private final Vibrator mVibrator; field in FingerprintEnrollEnrollingViewModel 99 mVibrator = application.getSystemService(Vibrator.class); in FingerprintEnrollEnrollingViewModel() 237 mVibrator.vibrate(mUserId, getApplication().getOpPackageName(), in vibrateError()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | VibrationPreferenceControllerTest.java | 71 private Vibrator mVibrator; field in VibrationPreferenceControllerTest 85 shadowApplication.setSystemService(Context.VIBRATOR_SERVICE, mVibrator); in setUp() 90 when(mVibrator.hasVibrator()).thenReturn(true); in setUp() 102 when(mVibrator.hasVibrator()).thenReturn(false); in testIsAvailable_notSystemDoesNotHave()
|