Prevent access to MotionEvent#mNativePtr
Fixes: 124051968
Test: compiled framework
Removes reflection access to MotionEvent#mNativePtr. All
necessary access to mNativePtr is available through the public
methods on MotionEvent, so access to mNativePtr is unnecessary.
Change-Id: I448eddfc4a5bc64deff44db2e69b5481477cdf91
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index b6a4a09..b6c4cbb 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -24,6 +24,7 @@
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.graphics.Matrix;
+import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
@@ -1513,7 +1514,7 @@
}
// Pointer to the native MotionEvent object that contains the actual data.
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private long mNativePtr;
private MotionEvent mNext;