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

Commit 3c0cdfb4 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Android (Google) Code Review
Browse files

Merge "Use aidl definitions for MotionEvent flag values" into main

parents 026dddcc ada314d0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.annotation.Nullable;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.IInputConstants;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.method.MetaKeyKeyListener;
@@ -1295,7 +1296,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * action for a key until it receives an up or the long press timeout has
     * expired.
     */
    public static final int FLAG_CANCELED = 0x20;
    public static final int FLAG_CANCELED = IInputConstants.INPUT_EVENT_FLAG_CANCELED;

    /**
     * This key event was generated by a virtual (on-screen) hard key area.
@@ -1363,7 +1364,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * @see #isTainted
     * @see #setTainted
     */
    public static final int FLAG_TAINTED = 0x80000000;
    public static final int FLAG_TAINTED = IInputConstants.INPUT_EVENT_FLAG_TAINTED;

    /**
     * Returns the maximum keycode.
+18 −8
Original line number Diff line number Diff line
@@ -16,7 +16,15 @@

package android.view;

import static android.os.IInputConstants.INPUT_EVENT_FLAG_CANCELED;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_HOVER_EXIT_PENDING;
import static android.os.IInputConstants.INPUT_EVENT_FLAG_IS_ACCESSIBILITY_EVENT;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_IS_GENERATED_GESTURE;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_NO_FOCUS_CHANGE;
import static android.os.IInputConstants.INPUT_EVENT_FLAG_TAINTED;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_TARGET_ACCESSIBILITY_FOCUS;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_WINDOW_IS_OBSCURED;
import static android.os.IInputConstants.MOTION_EVENT_FLAG_WINDOW_IS_PARTIALLY_OBSCURED;
import static android.view.Display.DEFAULT_DISPLAY;

import static java.lang.annotation.RetentionPolicy.SOURCE;
@@ -448,7 +456,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * to drop the suspect touches or to take additional precautions to confirm the user's
     * actual intent.
     */
    public static final int FLAG_WINDOW_IS_OBSCURED = 0x1;
    public static final int FLAG_WINDOW_IS_OBSCURED = MOTION_EVENT_FLAG_WINDOW_IS_OBSCURED;

    /**
     * This flag indicates that the window that received this motion event is partly
@@ -464,7 +472,8 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * Unlike FLAG_WINDOW_IS_OBSCURED, this is only true if the window that received this event is
     * obstructed in areas other than the touched location.
     */
    public static final int FLAG_WINDOW_IS_PARTIALLY_OBSCURED = 0x2;
    public static final int FLAG_WINDOW_IS_PARTIALLY_OBSCURED =
            MOTION_EVENT_FLAG_WINDOW_IS_PARTIALLY_OBSCURED;

    /**
     * This private flag is only set on {@link #ACTION_HOVER_MOVE} events and indicates that
@@ -472,7 +481,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * prevent generating redundant {@link #ACTION_HOVER_ENTER} events.
     * @hide
     */
    public static final int FLAG_HOVER_EXIT_PENDING = 0x4;
    public static final int FLAG_HOVER_EXIT_PENDING = MOTION_EVENT_FLAG_HOVER_EXIT_PENDING;

    /**
     * This flag indicates that the event has been generated by a gesture generator. It
@@ -480,7 +489,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     *
     * @hide
     */
    public static final int FLAG_IS_GENERATED_GESTURE = 0x8;
    public static final int FLAG_IS_GENERATED_GESTURE = MOTION_EVENT_FLAG_IS_GENERATED_GESTURE;

    /**
     * This flag is only set for events with {@link #ACTION_POINTER_UP} and {@link #ACTION_CANCEL}.
@@ -493,7 +502,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * @see #ACTION_POINTER_UP
     * @see #ACTION_CANCEL
     */
    public static final int FLAG_CANCELED = 0x20;
    public static final int FLAG_CANCELED = INPUT_EVENT_FLAG_CANCELED;

    /**
     * This flag indicates that the event will not cause a focus change if it is directed to an
@@ -502,7 +511,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * window into focus.
     * @hide
     */
    public static final int FLAG_NO_FOCUS_CHANGE = 0x40;
    public static final int FLAG_NO_FOCUS_CHANGE = MOTION_EVENT_FLAG_NO_FOCUS_CHANGE;

    /**
     * This flag indicates that this event was modified by or generated from an accessibility
@@ -521,7 +530,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * @see #isTainted
     * @see #setTainted
     */
    public static final int FLAG_TAINTED = 0x80000000;
    public static final int FLAG_TAINTED = INPUT_EVENT_FLAG_TAINTED;

    /**
     * Private flag indicating that this event was synthesized by the system and should be delivered
@@ -536,7 +545,8 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * @see #isTargetAccessibilityFocus()
     * @see #setTargetAccessibilityFocus(boolean)
     */
    public static final int FLAG_TARGET_ACCESSIBILITY_FOCUS = 0x40000000;
    public static final int FLAG_TARGET_ACCESSIBILITY_FOCUS =
            MOTION_EVENT_FLAG_TARGET_ACCESSIBILITY_FOCUS;

    /**
     * Flag indicating the motion event intersected the top edge of the screen.