diff --git a/core/api/current.txt b/core/api/current.txt index 7bdaa2b8da681..e5cc625038ddf 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -49403,6 +49403,8 @@ package android.view { field public static final int AXIS_GENERIC_7 = 38; // 0x26 field public static final int AXIS_GENERIC_8 = 39; // 0x27 field public static final int AXIS_GENERIC_9 = 40; // 0x28 + field public static final int AXIS_GESTURE_X_OFFSET = 48; // 0x30 + field public static final int AXIS_GESTURE_Y_OFFSET = 49; // 0x31 field public static final int AXIS_HAT_X = 15; // 0xf field public static final int AXIS_HAT_Y = 16; // 0x10 field public static final int AXIS_HSCROLL = 10; // 0xa diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java index b5dff5e725fbd..ceab310b64b2d 100644 --- a/core/java/android/view/MotionEvent.java +++ b/core/java/android/view/MotionEvent.java @@ -1272,6 +1272,25 @@ public final class MotionEvent extends InputEvent implements Parcelable { */ public static final int AXIS_GENERIC_16 = 47; + /** + * Axis constant: X gesture offset axis of a motion event. + *

+ *

+ */ + public static final int AXIS_GESTURE_X_OFFSET = 48; + + /** + * Axis constant: Y gesture offset axis of a motion event. + * + * The same as {@link #AXIS_GESTURE_X_OFFSET}, but for the Y axis. + */ + public static final int AXIS_GESTURE_Y_OFFSET = 49; + // NOTE: If you add a new axis here you must also add it to: // frameworks/native/include/android/input.h // frameworks/native/libs/input/InputEventLabels.cpp @@ -1325,6 +1344,8 @@ public final class MotionEvent extends InputEvent implements Parcelable { names.append(AXIS_GENERIC_14, "AXIS_GENERIC_14"); names.append(AXIS_GENERIC_15, "AXIS_GENERIC_15"); names.append(AXIS_GENERIC_16, "AXIS_GENERIC_16"); + names.append(AXIS_GESTURE_X_OFFSET, "AXIS_GESTURE_X_OFFSET"); + names.append(AXIS_GESTURE_Y_OFFSET, "AXIS_GESTURE_Y_OFFSET"); } /**