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

Commit 71d19fb9 authored by Harry Cutts's avatar Harry Cutts Committed by Android (Google) Code Review
Browse files

Merge "MotionEvent: add test API to identify resampled events" into main

parents 7b4ab317 e5245548
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3505,6 +3505,10 @@ package android.view {
    field public static final int FLAG_IS_ACCESSIBILITY_EVENT = 2048; // 0x800
  }

  public static final class MotionEvent.PointerCoords {
    method public boolean isResampled();
  }

  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public @interface RemotableViewMethod {
    method public abstract String asyncImpl() default "";
  }
+11 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.view;

import static android.os.IInputConstants.INPUT_EVENT_FLAG_IS_ACCESSIBILITY_EVENT;
import static android.view.Display.DEFAULT_DISPLAY;

import static java.lang.annotation.RetentionPolicy.SOURCE;

import android.annotation.IntDef;
@@ -4360,6 +4359,17 @@ public final class MotionEvent extends InputEvent implements Parcelable {
         */
        public boolean isResampled;

        /**
         * Returns true if this pointer coords object was generated by resampling, rather than from
         * an actual input event from the device at this time.
         *
         * @hide
         */
        @TestApi
        public boolean isResampled() {
            return isResampled;
        }

        /**
         * Clears the contents of this object.
         * Resets all axes to zero.