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

Commit 067669df authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Define Haptics for Rotary HapticFeedbackConstants

We could potentially refine these moving forward. For instance, we can
add an intensity difference between "limit" and "focus" effects, and/or
adjust the effects based on the rotary input resolution of devices.

Bug: 242084255
Test: manual with a Wear OS device
Change-Id: I8363bf14e040f65c05040e3ddcb11d7e4834e29e
parent fc48388a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5518,6 +5518,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        switch (effectId) {
            case HapticFeedbackConstants.CONTEXT_CLICK:
            case HapticFeedbackConstants.GESTURE_END:
            case HapticFeedbackConstants.ROTARY_SCROLL_TICK:
                return VibrationEffect.get(VibrationEffect.EFFECT_TICK);
            case HapticFeedbackConstants.TEXT_HANDLE_MOVE:
                if (!mHapticTextHandleEnabled) {
@@ -5536,6 +5537,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case HapticFeedbackConstants.EDGE_RELEASE:
            case HapticFeedbackConstants.CONFIRM:
            case HapticFeedbackConstants.GESTURE_START:
            case HapticFeedbackConstants.ROTARY_SCROLL_ITEM_FOCUS:
            case HapticFeedbackConstants.ROTARY_SCROLL_LIMIT:
                return VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
            case HapticFeedbackConstants.LONG_PRESS:
            case HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON: