Adjust MotionEvent.FLAG_CANCELED flag to public

The flas is used to indicates that the pointer has been canceled by
accidental touch.

Bug: 207322720
Test: atest CtsInputTestCases
Change-Id: I7e39242f53e78089adce622ca379109e88cf9ec2
This commit is contained in:
Arthur Hung
2021-11-22 07:02:16 +00:00
parent b248d9174e
commit 902de4cc3a
2 changed files with 10 additions and 4 deletions

View File

@@ -48886,6 +48886,7 @@ package android.view {
field public static final int EDGE_LEFT = 4; // 0x4
field public static final int EDGE_RIGHT = 8; // 0x8
field public static final int EDGE_TOP = 1; // 0x1
field public static final int FLAG_CANCELED = 32; // 0x20
field public static final int FLAG_WINDOW_IS_OBSCURED = 1; // 0x1
field public static final int FLAG_WINDOW_IS_PARTIALLY_OBSCURED = 2; // 0x2
field public static final int INVALID_POINTER_ID = -1; // 0xffffffff

View File

@@ -478,10 +478,15 @@ public final class MotionEvent extends InputEvent implements Parcelable {
public static final int FLAG_IS_GENERATED_GESTURE = 0x8;
/**
* This flag associated with {@link #ACTION_POINTER_UP}, this indicates that the pointer
* has been canceled. Typically this is used for palm event when the user has accidental
* touches.
* @hide
* This flag is only set for events with {@link #ACTION_POINTER_UP} and {@link #ACTION_CANCEL}.
* It indicates that the pointer going up was an unintentional user touch. When FLAG_CANCELED
* is set, the typical actions that occur in response for a pointer going up (such as click
* handlers, end of drawing) should be aborted. This flag is typically set when the user was
* accidentally touching the screen, such as by gripping the device, or placing the palm on the
* screen.
*
* @see #ACTION_POINTER_UP
* @see #ACTION_CANCEL
*/
public static final int FLAG_CANCELED = 0x20;