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

Commit a0260a17 authored by Phil Weaver's avatar Phil Weaver
Browse files

Stop system process crash in TouchExplorer

We need to straighten out this state machine so we can
fix bugs in it without a high risk of creating others
(b/38246304). In the meantime, catching this exception at
least allows the device to keep operating.

Bug: 37338581
Test: Reproduced the conditions of the crash. Verified that
we now print the log message.

Change-Id: I1f4f84b5529b2bf638e225d474808e3d42484e78
parent 70a8e869
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -938,7 +938,12 @@ class TouchExplorer implements EventStreamTransformation, AccessibilityGestureDe
        if (pointerIdBits == ALL_POINTER_ID_BITS) {
            event = prototype;
        } else {
            try {
                event = prototype.split(pointerIdBits);
            } catch (IllegalArgumentException e) {
                Slog.e(LOG_TAG, "sendMotionEvent: Failed to split motion event: " + e);
                return;
            }
        }
        if (action == MotionEvent.ACTION_DOWN) {
            event.setDownTime(event.getEventTime());