summaryrefslogtreecommitdiff
path: root/core/java/android/view/MotionEvent.java
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2018-06-08 22:49:30 +0100
committerSiarhei Vishniakou <svv@google.com>2018-07-05 16:29:51 +0100
commit91fa08ff1bd85ae41d71e1ed5ee72357c975ee3b (patch)
tree78a1d48c0aac3feeeb6212d1af5ac57a4986221f /core/java/android/view/MotionEvent.java
parentbeac1471aab97797a66542e9fd22e5cfc5447c02 (diff)
Move displayId into InputEvent
Now both KeyEvent and MotionEvent will contain displayId. This will help with dispatching input events to specific displays. There are use cases where a particular input device is used for a specific display only, and it sends key events to the system. This will help with those usages. Test: atest view.MotionEventTest view.KeyEventTest Bug: 64258305 Change-Id: I75891037617ed60820d60736216a0d615ab5e3b0
Diffstat (limited to 'core/java/android/view/MotionEvent.java')
-rw-r--r--core/java/android/view/MotionEvent.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 9148c27f6006..344806aa4d50 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -1943,11 +1943,13 @@ public final class MotionEvent extends InputEvent implements Parcelable {
}
/** @hide */
+ @Override
public int getDisplayId() {
return nativeGetDisplayId(mNativePtr);
}
/** @hide */
+ @Override
public void setDisplayId(int displayId) {
nativeSetDisplayId(mNativePtr, displayId);
}