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

Commit de210f4f authored by Jamie Garside's avatar Jamie Garside
Browse files

Add haptic feedback constants for rotary-input haptic events.

These haptic patterns should be used when the rotary input on a device
is being used to scroll views. One provides some texture to the scroll
(e.g. light taps every few degrees), one provides a slightly heavier tap
when passing an element in, say, a recyclerview, and the last provides a
"thud" when getting to the end of a list.

All hidden for now; this is mostly to reserve the constants that are
being used by Wear. We can then expose these in a Compat library in the
future.

Test: Only new constants, no new functionality.
Change-Id: Ic85c21d4cb79184c2e5aa4a9f12d91a13db14e85
parent 0aab0ab7
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -121,6 +121,29 @@ public class HapticFeedbackConstants {
     */
    public static final int REJECT = 17;

    /**
     * A haptic effect to provide texture while a rotary input device is being scrolled.
     *
     * @hide
     */
    public static final int ROTARY_SCROLL_TICK = 18;

    /**
     * A haptic effect to signal that a list element has been focused while scrolling using a rotary
     * input device.
     *
     * @hide
     */
    public static final int ROTARY_SCROLL_ITEM_FOCUS = 19;

    /**
     * A haptic effect to signal reaching the scrolling limits of a list while scrolling using a
     * rotary input device.
     *
     * @hide
     */
    public static final int ROTARY_SCROLL_LIMIT = 20;

    /**
     * The phone has booted with safe mode enabled.
     * This is a private constant.  Feel free to renumber as desired.