Add missing constructor parameter to KeyEvent
When in the SyntheticKeyHandler, a missing constructor paramater caused the
wrong contstructor to be called. This would cause the device id, scan code and
flags to be incorrect.
Bug: 10966229
Change-Id: Ib84ef88d28c0da517b376c5493a851cf8fe0a9f7
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 38f28ae..28f7480 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -4825,8 +4825,8 @@
enqueueInputEvent(new KeyEvent(event.getDownTime(), event.getEventTime(),
event.getAction(), keyCode, event.getRepeatCount(), event.getMetaState(),
- event.getScanCode(), event.getFlags() | KeyEvent.FLAG_FALLBACK,
- event.getSource()));
+ event.getDeviceId(), event.getScanCode(),
+ event.getFlags() | KeyEvent.FLAG_FALLBACK, event.getSource()));
return true;
}