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

Commit 5edd0e06 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Add new SOURCE_BLUETOOTH_STYLUS." into mnc-dev

parents 838a29a6 f18920ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34800,6 +34800,7 @@ package android.view {
    field public static final deprecated int MOTION_RANGE_X = 0; // 0x0
    field public static final deprecated int MOTION_RANGE_Y = 1; // 0x1
    field public static final int SOURCE_ANY = -256; // 0xffffff00
    field public static final int SOURCE_BLUETOOTH_STYLUS = 49154; // 0xc002
    field public static final int SOURCE_CLASS_BUTTON = 1; // 0x1
    field public static final int SOURCE_CLASS_JOYSTICK = 16; // 0x10
    field public static final int SOURCE_CLASS_MASK = 255; // 0xff
+1 −0
Original line number Diff line number Diff line
@@ -37081,6 +37081,7 @@ package android.view {
    field public static final deprecated int MOTION_RANGE_X = 0; // 0x0
    field public static final deprecated int MOTION_RANGE_Y = 1; // 0x1
    field public static final int SOURCE_ANY = -256; // 0xffffff00
    field public static final int SOURCE_BLUETOOTH_STYLUS = 49154; // 0xc002
    field public static final int SOURCE_CLASS_BUTTON = 1; // 0x1
    field public static final int SOURCE_CLASS_JOYSTICK = 16; // 0x10
    field public static final int SOURCE_CLASS_MASK = 255; // 0xff
+29 −0
Original line number Diff line number Diff line
@@ -200,6 +200,35 @@ public final class InputDevice implements Parcelable {
     */
    public static final int SOURCE_STYLUS = 0x00004000 | SOURCE_CLASS_POINTER;

    /**
     * The input device is a Bluetooth stylus.
     * <p>
     * Note that this bit merely indicates that an input device is capable of
     * obtaining input from a Bluetooth stylus.  To determine whether a given
     * touch event was produced by a stylus, examine the tool type returned by
     * {@link MotionEvent#getToolType(int)} for each individual pointer.
     * </p><p>
     * A single touch event may multiple pointers with different tool types,
     * such as an event that has one pointer with tool type
     * {@link MotionEvent#TOOL_TYPE_FINGER} and another pointer with tool type
     * {@link MotionEvent#TOOL_TYPE_STYLUS}.  So it is important to examine
     * the tool type of each pointer, regardless of the source reported
     * by {@link MotionEvent#getSource()}.
     * </p><p>
     * A bluetooth stylus generally receives its pressure and button state
     * information from the stylus itself, and derives the rest from another
     * source. For example, a Bluetooth stylus used in conjunction with a
     * touchscreen would derive its contact position and pointer size from the
     * touchscreen and may not be any more accurate than other tools such as
     * fingers.
     * </p>
     *
     * @see #SOURCE_STYLUS
     * @see #SOURCE_CLASS_POINTER
     */
    public static final int SOURCE_BLUETOOTH_STYLUS =
            0x00008000 | SOURCE_STYLUS;

    /**
     * The input source is a trackball.
     *