summaryrefslogtreecommitdiff
path: root/core/java/android/view/MotionEvent.java
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2019-02-08 09:58:45 -0800
committerGeorge Mount <mount@google.com>2019-02-08 09:58:45 -0800
commitbbc84a8b26a71275f4c177b37beadc8fa53dbc6d (patch)
tree191f8b589a99ed30f93bed35db6758c9ca8d261f /core/java/android/view/MotionEvent.java
parentf0cdc78790c4eecea498be370667d247e16e3ee1 (diff)
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
Diffstat (limited to 'core/java/android/view/MotionEvent.java')
-rw-r--r--core/java/android/view/MotionEvent.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index b6a4a095066f..b6c4cbbbe54d 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -24,6 +24,7 @@ import android.annotation.IntDef;
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 @@ public final class MotionEvent extends InputEvent implements Parcelable {
}
// Pointer to the native MotionEvent object that contains the actual data.
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private long mNativePtr;
private MotionEvent mNext;