Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7eb887a authored by Juan Sebastian Martinez's avatar Juan Sebastian Martinez
Browse files

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
parent a2e03265
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
    }

    /**