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

Commit 6f922ba0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Unlock icon plays success haptic on device entry" into sc-v2-dev am: eeb998c0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16405660

Change-Id: I09e5d261ff8f39253835b3392ff4c4284b3ef796
parents 60908719 eeb998c0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
                .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
                .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
                .build();
    private static final long LONG_PRESS_TIMEOUT = 150L; // milliseconds
    private static final long LONG_PRESS_TIMEOUT = 200L; // milliseconds

    @NonNull private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
    @NonNull private final KeyguardViewController mKeyguardViewController;
@@ -686,6 +686,17 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
        if (mOnGestureDetectedRunnable != null) {
            mOnGestureDetectedRunnable.run();
        }

        if (mVibrator != null) {
            // play device entry haptic (same as biometric success haptic)
            mVibrator.vibrate(
                    Process.myUid(),
                    getContext().getOpPackageName(),
                    UdfpsController.EFFECT_CLICK,
                    "lock-icon-device-entry",
                    VIBRATION_SONIFICATION_ATTRIBUTES);
        }

        mKeyguardViewController.showBouncer(/* scrim */ true);
    }