diff options
author | Jens Doll <jens.doll@gmail.com> | 2013-06-05 15:06:36 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2013-06-05 15:54:22 +0200 |
commit | e74de813c29fa2ad9ea8c155fa75591c8d5486b7 (patch) | |
tree | 7cf8864d0bf0ec8e65b1f17b8a74e0aba18fafaa /services | |
parent | 51dddfa005b54ba057eda22cbb3b4b308f07cf09 (diff) | |
download | frameworks_base-e74de813c29fa2ad9ea8c155fa75591c8d5486b7.zip frameworks_base-e74de813c29fa2ad9ea8c155fa75591c8d5486b7.tar.gz frameworks_base-e74de813c29fa2ad9ea8c155fa75591c8d5486b7.tar.bz2 |
Pie controls: Fix event handling on chained input filters
Enabling accessibility helpers like "Magnification gestures" while
pie controls are active will result in a system reboot. After this
every input event (touch/key) will cause a system restart directly.
This commit fixes this, by making semantics for
sendInputEvent() with one filter equal to the case where more than
one input filter is installed.
Change-Id: Ie8a319e8c9a63c82c77122332c7d5dd71672cc75
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/input/InputManagerService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/input/InputManagerService.java b/services/java/com/android/server/input/InputManagerService.java index aa3b283..a1d52d3 100644 --- a/services/java/com/android/server/input/InputManagerService.java +++ b/services/java/com/android/server/input/InputManagerService.java @@ -1656,7 +1656,11 @@ public class InputManagerService extends IInputManager.Stub policyFlags | WindowManagerPolicy.FLAG_FILTERED); } else { try { - mNext.mInputFilter.filterInputEvent(event, policyFlags); + // We need to pass a copy into filterInputEvent as it assumes + // the callee takes responsibility and recycles it - in case + // multiple filters are chained, calling into the second filter + // will cause event to be recycled twice + mNext.mInputFilter.filterInputEvent(event.copy(), policyFlags); } catch (RemoteException e) { /* ignore */ } |