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

Commit c6557ebd authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

PieInputFilter: Fix the check for the input device type

input sources are composites with all the supported capabilities,
not direct representations of the hardware.
A touchscreen with gesture or stylus capabilities will be a
TOUCHSCREEN|GESTURE, for example, and fail this check. Fix it.

Change-Id: Ib3a5b27be9f461245c6d010e1a7f454e9284437f
parent dbb69170
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -226,7 +226,8 @@ public class PieInputFilter implements IInputFilter {
            Trace.traceBegin(Trace.TRACE_TAG_INPUT, "filterInputEvent");
        }
        try {
            if (event.getSource() != InputDevice.SOURCE_TOUCHSCREEN
            if (((event.getSource() & InputDevice.SOURCE_TOUCHSCREEN)
                 != InputDevice.SOURCE_TOUCHSCREEN)
                    || !(event instanceof MotionEvent)) {
                sendInputEvent(event, policyFlags);
                return;