Class ShadowMotionEvent


  • @Implements(android.view.MotionEvent.class)
    public class ShadowMotionEvent
    extends java.lang.Object
    Shadow of MotionEvent. The Android framework stores motion events in a pool of native objects. All motion event data is stored natively, and accessed via a series of static native methods following the pattern nativeGetXXXX(mNativePtr, ...) This shadow mirrors this design, but has java equivalents of each native object. Most of the contents of this class were transliterated from oreo-mr1 (SDK 27) frameworks/base/core/jni/android_view_MotionEvent.cpp
    See Also:
    core/jni/android_view_MotionEvent.cpp Tests should not reference this class directly. MotionEvents should be created via one of the MotionEvent.obtain methods or via MotionEventBuilder.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected static void nativeAddBatch​(int nativePtr, long eventTimeNanos, android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray, int metaState)  
      protected static void nativeAddBatch​(long nativePtr, long eventTimeNanos, android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray, int metaState)  
      protected static int nativeAxisFromString​(java.lang.String label)  
      protected static java.lang.String nativeAxisToString​(int axis)  
      protected static int nativeCopy​(int destNativePtr, int sourceNativePtr, boolean keepHistory)  
      protected static long nativeCopy​(long destNativePtr, long sourceNativePtr, boolean keepHistory)  
      protected static void nativeDispose​(int nativePtr)  
      protected static void nativeDispose​(long nativePtr)  
      protected static int nativeFindPointerIndex​(int nativePtr, int pointerId)  
      protected static int nativeFindPointerIndex​(long nativePtr, int pointerId)  
      protected static int nativeGetAction​(int nativePtr)  
      protected static int nativeGetAction​(long nativePtr)  
      protected static int nativeGetActionButton​(long nativePtr)  
      protected static float nativeGetAxisValue​(int nativePtr, int axis, int pointerIndex, int historyPos)  
      protected static float nativeGetAxisValue​(long nativePtr, int axis, int pointerIndex, int historyPos)  
      protected static int nativeGetButtonState​(int nativePtr)  
      protected static int nativeGetButtonState​(long nativePtr)  
      protected static int nativeGetDeviceId​(int nativePtr)  
      protected static int nativeGetDeviceId​(long nativePtr)  
      protected static long nativeGetDownTimeNanos​(int nativePtr)  
      protected static long nativeGetDownTimeNanos​(long nativePtr)  
      protected static int nativeGetEdgeFlags​(int nativePtr)  
      protected static int nativeGetEdgeFlags​(long nativePtr)  
      protected static long nativeGetEventTimeNanos​(int nativePtr, int historyPos)  
      protected static long nativeGetEventTimeNanos​(long nativePtr, int historyPos)  
      protected static int nativeGetFlags​(int nativePtr)  
      protected static int nativeGetFlags​(long nativePtr)  
      protected static int nativeGetHistorySize​(int nativePtr)  
      protected static int nativeGetHistorySize​(long nativePtr)  
      protected static int nativeGetMetaState​(int nativePtr)  
      protected static int nativeGetMetaState​(long nativePtr)  
      protected static void nativeGetPointerCoords​(int nativePtr, int pointerIndex, int historyPos, android.view.MotionEvent.PointerCoords outPointerCoordsObj)  
      protected static void nativeGetPointerCoords​(long nativePtr, int pointerIndex, int historyPos, android.view.MotionEvent.PointerCoords outPointerCoordsObj)  
      protected static int nativeGetPointerCount​(int nativePtr)  
      protected static int nativeGetPointerCount​(long nativePtr)  
      protected static int nativeGetPointerId​(int nativePtr, int pointerIndex)  
      protected static int nativeGetPointerId​(long nativePtr, int pointerIndex)  
      protected static void nativeGetPointerProperties​(int nativePtr, int pointerIndex, android.view.MotionEvent.PointerProperties outPointerPropertiesObj)  
      protected static void nativeGetPointerProperties​(long nativePtr, int pointerIndex, android.view.MotionEvent.PointerProperties outPointerPropertiesObj)  
      protected static float nativeGetRawAxisValue​(int nativePtr, int axis, int pointerIndex, int historyPos)  
      protected static float nativeGetRawAxisValue​(long nativePtr, int axis, int pointerIndex, int historyPos)  
      protected static int nativeGetSource​(int nativePtr)  
      protected static int nativeGetSource​(long nativePtr)  
      protected static int nativeGetToolType​(int nativePtr, int pointerIndex)  
      protected static int nativeGetToolType​(long nativePtr, int pointerIndex)  
      protected static float nativeGetXOffset​(int nativePtr)  
      protected static float nativeGetXOffset​(long nativePtr)  
      protected static float nativeGetXPrecision​(int nativePtr)  
      protected static float nativeGetXPrecision​(long nativePtr)  
      protected static float nativeGetYOffset​(int nativePtr)  
      protected static float nativeGetYOffset​(long nativePtr)  
      protected static float nativeGetYPrecision​(int nativePtr)  
      protected static float nativeGetYPrecision​(long nativePtr)  
      protected static int nativeInitialize​(int nativePtr, int deviceId, int source, int action, int flags, int edgeFlags, int metaState, int buttonState, float xOffset, float yOffset, float xPrecision, float yPrecision, long downTimeNanos, long eventTimeNanos, int pointerCount, android.view.MotionEvent.PointerProperties[] pointerIds, android.view.MotionEvent.PointerCoords[] pointerCoords)  
      protected static long nativeInitialize​(long nativePtr, int deviceId, int source, int action, int flags, int edgeFlags, int metaState, int buttonState, float xOffset, float yOffset, float xPrecision, float yPrecision, long downTimeNanos, long eventTimeNanos, int pointerCount, android.view.MotionEvent.PointerProperties[] pointerPropertiesObjArray, android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray)  
      protected static long nativeInitialize​(long nativePtr, int deviceId, int source, int displayId, int action, int flags, int edgeFlags, int metaState, int buttonState, int classification, float xOffset, float yOffset, float xPrecision, float yPrecision, long downTimeNanos, long eventTimeNanos, int pointerCount, android.view.MotionEvent.PointerProperties[] pointerIds, android.view.MotionEvent.PointerCoords[] pointerCoords)  
      protected static boolean nativeIsTouchEvent​(int nativePtr)  
      protected static boolean nativeIsTouchEvent​(long nativePtr)  
      protected static void nativeOffsetLocation​(int nativePtr, float deltaX, float deltaY)  
      protected static void nativeOffsetLocation​(long nativePtr, float deltaX, float deltaY)  
      protected static int nativeReadFromParcel​(int nativePtr, android.os.Parcel parcelObj)  
      protected static long nativeReadFromParcel​(long nativePtr, android.os.Parcel parcelObj)  
      protected static void nativeScale​(int nativePtr, float scale)  
      protected static void nativeScale​(long nativePtr, float scale)  
      protected static void nativeSetAction​(int nativePtr, int action)  
      protected static void nativeSetAction​(long nativePtr, int action)  
      protected static void nativeSetActionButton​(long nativePtr, int button)  
      protected static void nativeSetButtonState​(long nativePtr, int buttonState)  
      protected static void nativeSetDownTimeNanos​(int nativePtr, long downTimeNanos)  
      protected static void nativeSetDownTimeNanos​(long nativePtr, long downTimeNanos)  
      protected static void nativeSetEdgeFlags​(int nativePtr, int edgeFlags)  
      protected static void nativeSetEdgeFlags​(long nativePtr, int edgeFlags)  
      protected static void nativeSetFlags​(int nativePtr, int flags)  
      protected static void nativeSetFlags​(long nativePtr, int flags)  
      protected static int nativeSetSource​(int nativePtr, int source)  
      protected static void nativeSetSource​(long nativePtr, int source)  
      protected static void nativeWriteToParcel​(int nativePtr, android.os.Parcel parcel)  
      protected static void nativeWriteToParcel​(long nativePtr, android.os.Parcel parcel)  
      static void reset()  
      android.view.MotionEvent setPointer2​(float pointer1X, float pointer1Y)
      Deprecated.
      use MotionEvent.obtain() or androidx.test.core.view.MotionEventBuilder to create a MotionEvent with desired data.
      void setPointerIds​(int index0PointerId, int index1PointerId)
      Deprecated.
      use MotionEvent.obtain() or MotionEventBuilder to create a MotionEvent with desired data
      void setPointerIndex​(int pointerIndex)
      Deprecated.
      use MotionEvent.obtain() or androidx.test.core.view.MotionEventBuilder#setPointerAction(int, int) to create a MotionEvent with desired data.
      protected void transform​(android.graphics.Matrix matrix)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowMotionEvent

        public ShadowMotionEvent()
    • Method Detail

      • reset

        @Resetter
        public static void reset()
      • nativeInitialize

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeInitialize​(int nativePtr,
                                              int deviceId,
                                              int source,
                                              int action,
                                              int flags,
                                              int edgeFlags,
                                              int metaState,
                                              int buttonState,
                                              float xOffset,
                                              float yOffset,
                                              float xPrecision,
                                              float yPrecision,
                                              long downTimeNanos,
                                              long eventTimeNanos,
                                              int pointerCount,
                                              android.view.MotionEvent.PointerProperties[] pointerIds,
                                              android.view.MotionEvent.PointerCoords[] pointerCoords)
      • nativeInitialize

        @Implementation(minSdk=21,
                        maxSdk=28)
        @HiddenApi
        protected static long nativeInitialize​(long nativePtr,
                                               int deviceId,
                                               int source,
                                               int action,
                                               int flags,
                                               int edgeFlags,
                                               int metaState,
                                               int buttonState,
                                               float xOffset,
                                               float yOffset,
                                               float xPrecision,
                                               float yPrecision,
                                               long downTimeNanos,
                                               long eventTimeNanos,
                                               int pointerCount,
                                               android.view.MotionEvent.PointerProperties[] pointerPropertiesObjArray,
                                               android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray)
      • nativeInitialize

        @Implementation(minSdk=29)
        @HiddenApi
        protected static long nativeInitialize​(long nativePtr,
                                               int deviceId,
                                               int source,
                                               int displayId,
                                               int action,
                                               int flags,
                                               int edgeFlags,
                                               int metaState,
                                               int buttonState,
                                               int classification,
                                               float xOffset,
                                               float yOffset,
                                               float xPrecision,
                                               float yPrecision,
                                               long downTimeNanos,
                                               long eventTimeNanos,
                                               int pointerCount,
                                               android.view.MotionEvent.PointerProperties[] pointerIds,
                                               android.view.MotionEvent.PointerCoords[] pointerCoords)
      • nativeDispose

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeDispose​(int nativePtr)
      • nativeDispose

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeDispose​(long nativePtr)
      • nativeAddBatch

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeAddBatch​(int nativePtr,
                                             long eventTimeNanos,
                                             android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray,
                                             int metaState)
      • nativeAddBatch

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeAddBatch​(long nativePtr,
                                             long eventTimeNanos,
                                             android.view.MotionEvent.PointerCoords[] pointerCoordsObjArray,
                                             int metaState)
      • nativeGetPointerCoords

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeGetPointerCoords​(int nativePtr,
                                                     int pointerIndex,
                                                     int historyPos,
                                                     android.view.MotionEvent.PointerCoords outPointerCoordsObj)
      • nativeGetPointerCoords

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeGetPointerCoords​(long nativePtr,
                                                     int pointerIndex,
                                                     int historyPos,
                                                     android.view.MotionEvent.PointerCoords outPointerCoordsObj)
      • nativeGetPointerProperties

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeGetPointerProperties​(int nativePtr,
                                                         int pointerIndex,
                                                         android.view.MotionEvent.PointerProperties outPointerPropertiesObj)
      • nativeGetPointerProperties

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeGetPointerProperties​(long nativePtr,
                                                         int pointerIndex,
                                                         android.view.MotionEvent.PointerProperties outPointerPropertiesObj)
      • nativeReadFromParcel

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeReadFromParcel​(int nativePtr,
                                                  android.os.Parcel parcelObj)
      • nativeReadFromParcel

        @Implementation(minSdk=21)
        @HiddenApi
        protected static long nativeReadFromParcel​(long nativePtr,
                                                   android.os.Parcel parcelObj)
      • nativeWriteToParcel

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeWriteToParcel​(int nativePtr,
                                                  android.os.Parcel parcel)
      • nativeWriteToParcel

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeWriteToParcel​(long nativePtr,
                                                  android.os.Parcel parcel)
      • nativeAxisToString

        @Implementation(minSdk=21)
        @HiddenApi
        protected static java.lang.String nativeAxisToString​(int axis)
      • nativeAxisFromString

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeAxisFromString​(java.lang.String label)
      • nativeGetPointerId

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetPointerId​(int nativePtr,
                                                int pointerIndex)
      • nativeGetPointerId

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetPointerId​(long nativePtr,
                                                int pointerIndex)
      • nativeGetToolType

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetToolType​(int nativePtr,
                                               int pointerIndex)
      • nativeGetToolType

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetToolType​(long nativePtr,
                                               int pointerIndex)
      • nativeGetEventTimeNanos

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static long nativeGetEventTimeNanos​(int nativePtr,
                                                      int historyPos)
      • nativeGetEventTimeNanos

        @Implementation(minSdk=21)
        @HiddenApi
        protected static long nativeGetEventTimeNanos​(long nativePtr,
                                                      int historyPos)
      • nativeGetRawAxisValue

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetRawAxisValue​(int nativePtr,
                                                     int axis,
                                                     int pointerIndex,
                                                     int historyPos)
      • nativeGetRawAxisValue

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetRawAxisValue​(long nativePtr,
                                                     int axis,
                                                     int pointerIndex,
                                                     int historyPos)
      • nativeGetAxisValue

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetAxisValue​(int nativePtr,
                                                  int axis,
                                                  int pointerIndex,
                                                  int historyPos)
      • nativeGetAxisValue

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetAxisValue​(long nativePtr,
                                                  int axis,
                                                  int pointerIndex,
                                                  int historyPos)
      • nativeCopy

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeCopy​(int destNativePtr,
                                        int sourceNativePtr,
                                        boolean keepHistory)
      • nativeCopy

        @Implementation(minSdk=21)
        @HiddenApi
        protected static long nativeCopy​(long destNativePtr,
                                         long sourceNativePtr,
                                         boolean keepHistory)
      • nativeGetDeviceId

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetDeviceId​(int nativePtr)
      • nativeGetDeviceId

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetDeviceId​(long nativePtr)
      • nativeGetSource

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetSource​(int nativePtr)
      • nativeGetSource

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetSource​(long nativePtr)
      • nativeSetSource

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeSetSource​(int nativePtr,
                                             int source)
      • nativeSetSource

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeSetSource​(long nativePtr,
                                              int source)
      • nativeGetAction

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetAction​(int nativePtr)
      • nativeGetAction

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetAction​(long nativePtr)
      • nativeSetAction

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeSetAction​(int nativePtr,
                                              int action)
      • nativeSetAction

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeSetAction​(long nativePtr,
                                              int action)
      • nativeGetActionButton

        @Implementation(minSdk=23)
        @HiddenApi
        protected static int nativeGetActionButton​(long nativePtr)
      • nativeSetActionButton

        @Implementation(minSdk=23)
        @HiddenApi
        protected static void nativeSetActionButton​(long nativePtr,
                                                    int button)
      • nativeIsTouchEvent

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static boolean nativeIsTouchEvent​(int nativePtr)
      • nativeIsTouchEvent

        @Implementation(minSdk=21)
        @HiddenApi
        protected static boolean nativeIsTouchEvent​(long nativePtr)
      • nativeGetFlags

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetFlags​(int nativePtr)
      • nativeGetFlags

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetFlags​(long nativePtr)
      • nativeSetFlags

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeSetFlags​(int nativePtr,
                                             int flags)
      • nativeSetFlags

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeSetFlags​(long nativePtr,
                                             int flags)
      • nativeGetEdgeFlags

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetEdgeFlags​(int nativePtr)
      • nativeGetEdgeFlags

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetEdgeFlags​(long nativePtr)
      • nativeSetEdgeFlags

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeSetEdgeFlags​(int nativePtr,
                                                 int edgeFlags)
      • nativeSetEdgeFlags

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeSetEdgeFlags​(long nativePtr,
                                                 int edgeFlags)
      • nativeGetMetaState

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetMetaState​(int nativePtr)
      • nativeGetMetaState

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetMetaState​(long nativePtr)
      • nativeGetButtonState

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetButtonState​(int nativePtr)
      • nativeGetButtonState

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetButtonState​(long nativePtr)
      • nativeSetButtonState

        @Implementation(minSdk=23)
        @HiddenApi
        protected static void nativeSetButtonState​(long nativePtr,
                                                   int buttonState)
      • nativeOffsetLocation

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeOffsetLocation​(int nativePtr,
                                                   float deltaX,
                                                   float deltaY)
      • nativeOffsetLocation

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeOffsetLocation​(long nativePtr,
                                                   float deltaX,
                                                   float deltaY)
      • nativeGetXOffset

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetXOffset​(int nativePtr)
      • nativeGetXOffset

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetXOffset​(long nativePtr)
      • nativeGetYOffset

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetYOffset​(int nativePtr)
      • nativeGetYOffset

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetYOffset​(long nativePtr)
      • nativeGetXPrecision

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetXPrecision​(int nativePtr)
      • nativeGetXPrecision

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetXPrecision​(long nativePtr)
      • nativeGetYPrecision

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static float nativeGetYPrecision​(int nativePtr)
      • nativeGetYPrecision

        @Implementation(minSdk=21)
        @HiddenApi
        protected static float nativeGetYPrecision​(long nativePtr)
      • nativeGetDownTimeNanos

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static long nativeGetDownTimeNanos​(int nativePtr)
      • nativeGetDownTimeNanos

        @Implementation(minSdk=21)
        @HiddenApi
        protected static long nativeGetDownTimeNanos​(long nativePtr)
      • nativeSetDownTimeNanos

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeSetDownTimeNanos​(int nativePtr,
                                                     long downTimeNanos)
      • nativeSetDownTimeNanos

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeSetDownTimeNanos​(long nativePtr,
                                                     long downTimeNanos)
      • nativeGetPointerCount

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetPointerCount​(int nativePtr)
      • nativeGetPointerCount

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetPointerCount​(long nativePtr)
      • nativeFindPointerIndex

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeFindPointerIndex​(int nativePtr,
                                                    int pointerId)
      • nativeFindPointerIndex

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeFindPointerIndex​(long nativePtr,
                                                    int pointerId)
      • nativeGetHistorySize

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static int nativeGetHistorySize​(int nativePtr)
      • nativeGetHistorySize

        @Implementation(minSdk=21)
        @HiddenApi
        protected static int nativeGetHistorySize​(long nativePtr)
      • nativeScale

        @Implementation(maxSdk=20)
        @HiddenApi
        protected static void nativeScale​(int nativePtr,
                                          float scale)
      • nativeScale

        @Implementation(minSdk=21)
        @HiddenApi
        protected static void nativeScale​(long nativePtr,
                                          float scale)
      • transform

        @Implementation
        protected final void transform​(android.graphics.Matrix matrix)
      • setPointer2

        @Deprecated
        public android.view.MotionEvent setPointer2​(float pointer1X,
                                                    float pointer1Y)
        Deprecated.
        use MotionEvent.obtain() or androidx.test.core.view.MotionEventBuilder to create a MotionEvent with desired data.
      • setPointerIndex

        @Deprecated
        public void setPointerIndex​(int pointerIndex)
        Deprecated.
        use MotionEvent.obtain() or androidx.test.core.view.MotionEventBuilder#setPointerAction(int, int) to create a MotionEvent with desired data.
      • setPointerIds

        @Deprecated
        public void setPointerIds​(int index0PointerId,
                                  int index1PointerId)
        Deprecated.
        use MotionEvent.obtain() or MotionEventBuilder to create a MotionEvent with desired data