diff options
| author | 2024-09-04 12:16:18 -0700 | |
|---|---|---|
| committer | 2024-09-04 12:16:18 -0700 | |
| commit | e7eb887a8d8b51fb7fc2bae827d05a64be64bdeb (patch) | |
| tree | 458735a087e86e3cbfe62f2db322e15e25253bca | |
| parent | a2e032650788f64be5147223d2bf8df0eba97c8d (diff) | |
Fix to vibration attributes used for authentication.
Vibration attributes for USAGE_COMMUNICATION_REQUEST are now used for
authentication to be consistent with the BIOMETRIC_CONFIRM and
BIOMETRIC_REJECT HapticFeedbackConstants.
Test: atest VibratorHelperTest
Flag: EXEMPT bug fix to make authentication haptics more consistent.
Bug: 364667240
Change-Id: I37945a2a401a8dfd8758778d163a871f9917ac46
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java index 64dfc6c9eb3c..735b4c34f86f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/VibratorHelper.java @@ -54,6 +54,8 @@ public class VibratorHelper { VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK); private static final VibrationAttributes HARDWARE_FEEDBACK_VIBRATION_ATTRIBUTES = VibrationAttributes.createForUsage(VibrationAttributes.USAGE_HARDWARE_FEEDBACK); + private static final VibrationAttributes COMMUNICATION_REQUEST_VIBRATION_ATTRIBUTES = + VibrationAttributes.createForUsage(VibrationAttributes.USAGE_COMMUNICATION_REQUEST); private final Executor mExecutor; @@ -151,7 +153,7 @@ public class VibratorHelper { vibrate(Process.myUid(), "com.android.systemui", BIOMETRIC_SUCCESS_VIBRATION_EFFECT, reason, - HARDWARE_FEEDBACK_VIBRATION_ATTRIBUTES); + COMMUNICATION_REQUEST_VIBRATION_ATTRIBUTES); } /** @@ -160,7 +162,7 @@ public class VibratorHelper { public void vibrateAuthError(String reason) { vibrate(Process.myUid(), "com.android.systemui", BIOMETRIC_ERROR_VIBRATION_EFFECT, reason, - HARDWARE_FEEDBACK_VIBRATION_ATTRIBUTES); + COMMUNICATION_REQUEST_VIBRATION_ATTRIBUTES); } /** |