Loading api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -21425,7 +21425,6 @@ package android.view { field public static final int AXIS_Y = 1; // 0x1 field public static final int AXIS_Y = 1; // 0x1 field public static final int AXIS_Z = 11; // 0xb field public static final int AXIS_Z = 11; // 0xb field public static final int BUTTON_BACK = 8; // 0x8 field public static final int BUTTON_BACK = 8; // 0x8 field public static final int BUTTON_ERASER = 32; // 0x20 field public static final int BUTTON_FORWARD = 16; // 0x10 field public static final int BUTTON_FORWARD = 16; // 0x10 field public static final int BUTTON_PRIMARY = 1; // 0x1 field public static final int BUTTON_PRIMARY = 1; // 0x1 field public static final int BUTTON_SECONDARY = 2; // 0x2 field public static final int BUTTON_SECONDARY = 2; // 0x2 Loading Loading @@ -22010,6 +22009,7 @@ package android.view { method public void setOnDragListener(android.view.View.OnDragListener); method public void setOnDragListener(android.view.View.OnDragListener); method public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener); method public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener); method public void setOnGenericMotionListener(android.view.View.OnGenericMotionListener); method public void setOnGenericMotionListener(android.view.View.OnGenericMotionListener); method public void setOnHoverListener(android.view.View.OnHoverListener); method public void setOnKeyListener(android.view.View.OnKeyListener); method public void setOnKeyListener(android.view.View.OnKeyListener); method public void setOnLongClickListener(android.view.View.OnLongClickListener); method public void setOnLongClickListener(android.view.View.OnLongClickListener); method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener); method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener); core/java/android/view/MotionEvent.java +3 −11 Original line number Original line Diff line number Diff line Loading @@ -1130,14 +1130,14 @@ public final class MotionEvent extends InputEvent implements Parcelable { public static final int BUTTON_PRIMARY = 1 << 0; public static final int BUTTON_PRIMARY = 1 << 0; /** /** * Button constant: Secondary button (right mouse button, stylus barrel). * Button constant: Secondary button (right mouse button, stylus first button). * * * @see #getButtonState * @see #getButtonState */ */ public static final int BUTTON_SECONDARY = 1 << 1; public static final int BUTTON_SECONDARY = 1 << 1; /** /** * Button constant: Tertiary button (middle mouse button). * Button constant: Tertiary button (middle mouse button, stylus second button). * * * @see #getButtonState * @see #getButtonState */ */ Loading Loading @@ -1165,13 +1165,6 @@ public final class MotionEvent extends InputEvent implements Parcelable { */ */ public static final int BUTTON_FORWARD = 1 << 4; public static final int BUTTON_FORWARD = 1 << 4; /** * Button constant: Eraser button pressed (stylus end). * * @see #getButtonState */ public static final int BUTTON_ERASER = 1 << 5; // NOTE: If you add a new axis here you must also add it to: // NOTE: If you add a new axis here you must also add it to: // native/include/android/input.h // native/include/android/input.h Loading @@ -1183,7 +1176,7 @@ public final class MotionEvent extends InputEvent implements Parcelable { "BUTTON_TERTIARY", "BUTTON_TERTIARY", "BUTTON_BACK", "BUTTON_BACK", "BUTTON_FORWARD", "BUTTON_FORWARD", "BUTTON_ERASER", "0x00000020", "0x00000040", "0x00000040", "0x00000080", "0x00000080", "0x00000100", "0x00000100", Loading Loading @@ -2176,7 +2169,6 @@ public final class MotionEvent extends InputEvent implements Parcelable { * @see #BUTTON_TERTIARY * @see #BUTTON_TERTIARY * @see #BUTTON_FORWARD * @see #BUTTON_FORWARD * @see #BUTTON_BACK * @see #BUTTON_BACK * @see #BUTTON_ERASER */ */ public final int getButtonState() { public final int getButtonState() { return nativeGetButtonState(mNativePtr); return nativeGetButtonState(mNativePtr); Loading core/java/android/view/View.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -3389,6 +3389,14 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit mOnGenericMotionListener = l; mOnGenericMotionListener = l; } } /** * Register a callback to be invoked when a hover event is sent to this view. * @param l the hover listener to attach to this view */ public void setOnHoverListener(OnHoverListener l) { mOnHoverListener = l; } /** /** * Register a drag event listener callback object for this View. The parameter is * Register a drag event listener callback object for this View. The parameter is * an implementation of {@link android.view.View.OnDragListener}. To send a drag event to a * an implementation of {@link android.view.View.OnDragListener}. To send a drag event to a Loading native/include/android/input.h +0 −1 Original line number Original line Diff line number Diff line Loading @@ -404,7 +404,6 @@ enum { AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_ERASER = 1 << 5, }; }; /* /* Loading services/input/InputReader.cpp +4 −4 Original line number Original line Diff line number Diff line Loading @@ -154,14 +154,15 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) { case BTN_LEFT: case BTN_LEFT: return AMOTION_EVENT_BUTTON_PRIMARY; return AMOTION_EVENT_BUTTON_PRIMARY; case BTN_RIGHT: case BTN_RIGHT: case BTN_STYLUS: return AMOTION_EVENT_BUTTON_SECONDARY; return AMOTION_EVENT_BUTTON_SECONDARY; case BTN_MIDDLE: case BTN_MIDDLE: case BTN_STYLUS2: return AMOTION_EVENT_BUTTON_TERTIARY; return AMOTION_EVENT_BUTTON_TERTIARY; case BTN_SIDE: case BTN_SIDE: return AMOTION_EVENT_BUTTON_BACK; return AMOTION_EVENT_BUTTON_BACK; case BTN_EXTRA: return AMOTION_EVENT_BUTTON_FORWARD; case BTN_FORWARD: case BTN_FORWARD: case BTN_EXTRA: return AMOTION_EVENT_BUTTON_FORWARD; return AMOTION_EVENT_BUTTON_FORWARD; case BTN_BACK: case BTN_BACK: return AMOTION_EVENT_BUTTON_BACK; return AMOTION_EVENT_BUTTON_BACK; Loading @@ -176,8 +177,7 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) { static bool isPointerDown(int32_t buttonState) { static bool isPointerDown(int32_t buttonState) { return buttonState & return buttonState & (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY | AMOTION_EVENT_BUTTON_TERTIARY); | AMOTION_EVENT_BUTTON_ERASER); } } static int32_t calculateEdgeFlagsUsingPointerBounds( static int32_t calculateEdgeFlagsUsingPointerBounds( Loading Loading
api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -21425,7 +21425,6 @@ package android.view { field public static final int AXIS_Y = 1; // 0x1 field public static final int AXIS_Y = 1; // 0x1 field public static final int AXIS_Z = 11; // 0xb field public static final int AXIS_Z = 11; // 0xb field public static final int BUTTON_BACK = 8; // 0x8 field public static final int BUTTON_BACK = 8; // 0x8 field public static final int BUTTON_ERASER = 32; // 0x20 field public static final int BUTTON_FORWARD = 16; // 0x10 field public static final int BUTTON_FORWARD = 16; // 0x10 field public static final int BUTTON_PRIMARY = 1; // 0x1 field public static final int BUTTON_PRIMARY = 1; // 0x1 field public static final int BUTTON_SECONDARY = 2; // 0x2 field public static final int BUTTON_SECONDARY = 2; // 0x2 Loading Loading @@ -22010,6 +22009,7 @@ package android.view { method public void setOnDragListener(android.view.View.OnDragListener); method public void setOnDragListener(android.view.View.OnDragListener); method public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener); method public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener); method public void setOnGenericMotionListener(android.view.View.OnGenericMotionListener); method public void setOnGenericMotionListener(android.view.View.OnGenericMotionListener); method public void setOnHoverListener(android.view.View.OnHoverListener); method public void setOnKeyListener(android.view.View.OnKeyListener); method public void setOnKeyListener(android.view.View.OnKeyListener); method public void setOnLongClickListener(android.view.View.OnLongClickListener); method public void setOnLongClickListener(android.view.View.OnLongClickListener); method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener); method public void setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener);
core/java/android/view/MotionEvent.java +3 −11 Original line number Original line Diff line number Diff line Loading @@ -1130,14 +1130,14 @@ public final class MotionEvent extends InputEvent implements Parcelable { public static final int BUTTON_PRIMARY = 1 << 0; public static final int BUTTON_PRIMARY = 1 << 0; /** /** * Button constant: Secondary button (right mouse button, stylus barrel). * Button constant: Secondary button (right mouse button, stylus first button). * * * @see #getButtonState * @see #getButtonState */ */ public static final int BUTTON_SECONDARY = 1 << 1; public static final int BUTTON_SECONDARY = 1 << 1; /** /** * Button constant: Tertiary button (middle mouse button). * Button constant: Tertiary button (middle mouse button, stylus second button). * * * @see #getButtonState * @see #getButtonState */ */ Loading Loading @@ -1165,13 +1165,6 @@ public final class MotionEvent extends InputEvent implements Parcelable { */ */ public static final int BUTTON_FORWARD = 1 << 4; public static final int BUTTON_FORWARD = 1 << 4; /** * Button constant: Eraser button pressed (stylus end). * * @see #getButtonState */ public static final int BUTTON_ERASER = 1 << 5; // NOTE: If you add a new axis here you must also add it to: // NOTE: If you add a new axis here you must also add it to: // native/include/android/input.h // native/include/android/input.h Loading @@ -1183,7 +1176,7 @@ public final class MotionEvent extends InputEvent implements Parcelable { "BUTTON_TERTIARY", "BUTTON_TERTIARY", "BUTTON_BACK", "BUTTON_BACK", "BUTTON_FORWARD", "BUTTON_FORWARD", "BUTTON_ERASER", "0x00000020", "0x00000040", "0x00000040", "0x00000080", "0x00000080", "0x00000100", "0x00000100", Loading Loading @@ -2176,7 +2169,6 @@ public final class MotionEvent extends InputEvent implements Parcelable { * @see #BUTTON_TERTIARY * @see #BUTTON_TERTIARY * @see #BUTTON_FORWARD * @see #BUTTON_FORWARD * @see #BUTTON_BACK * @see #BUTTON_BACK * @see #BUTTON_ERASER */ */ public final int getButtonState() { public final int getButtonState() { return nativeGetButtonState(mNativePtr); return nativeGetButtonState(mNativePtr); Loading
core/java/android/view/View.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -3389,6 +3389,14 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit mOnGenericMotionListener = l; mOnGenericMotionListener = l; } } /** * Register a callback to be invoked when a hover event is sent to this view. * @param l the hover listener to attach to this view */ public void setOnHoverListener(OnHoverListener l) { mOnHoverListener = l; } /** /** * Register a drag event listener callback object for this View. The parameter is * Register a drag event listener callback object for this View. The parameter is * an implementation of {@link android.view.View.OnDragListener}. To send a drag event to a * an implementation of {@link android.view.View.OnDragListener}. To send a drag event to a Loading
native/include/android/input.h +0 −1 Original line number Original line Diff line number Diff line Loading @@ -404,7 +404,6 @@ enum { AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_ERASER = 1 << 5, }; }; /* /* Loading
services/input/InputReader.cpp +4 −4 Original line number Original line Diff line number Diff line Loading @@ -154,14 +154,15 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) { case BTN_LEFT: case BTN_LEFT: return AMOTION_EVENT_BUTTON_PRIMARY; return AMOTION_EVENT_BUTTON_PRIMARY; case BTN_RIGHT: case BTN_RIGHT: case BTN_STYLUS: return AMOTION_EVENT_BUTTON_SECONDARY; return AMOTION_EVENT_BUTTON_SECONDARY; case BTN_MIDDLE: case BTN_MIDDLE: case BTN_STYLUS2: return AMOTION_EVENT_BUTTON_TERTIARY; return AMOTION_EVENT_BUTTON_TERTIARY; case BTN_SIDE: case BTN_SIDE: return AMOTION_EVENT_BUTTON_BACK; return AMOTION_EVENT_BUTTON_BACK; case BTN_EXTRA: return AMOTION_EVENT_BUTTON_FORWARD; case BTN_FORWARD: case BTN_FORWARD: case BTN_EXTRA: return AMOTION_EVENT_BUTTON_FORWARD; return AMOTION_EVENT_BUTTON_FORWARD; case BTN_BACK: case BTN_BACK: return AMOTION_EVENT_BUTTON_BACK; return AMOTION_EVENT_BUTTON_BACK; Loading @@ -176,8 +177,7 @@ static uint32_t getButtonStateForScanCode(int32_t scanCode) { static bool isPointerDown(int32_t buttonState) { static bool isPointerDown(int32_t buttonState) { return buttonState & return buttonState & (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY | AMOTION_EVENT_BUTTON_TERTIARY); | AMOTION_EVENT_BUTTON_ERASER); } } static int32_t calculateEdgeFlagsUsingPointerBounds( static int32_t calculateEdgeFlagsUsingPointerBounds( Loading