Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e74de813 authored by Jens Doll's avatar Jens Doll Committed by Danny Baumann
Browse files

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
parent 51dddfa0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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 */
                        }