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

Commit e89f48bf authored by Svetoslav's avatar Svetoslav
Browse files

Crash in ViewRootImpl when accessibility is on.

We fire view subtree mutation events every X amount of time.
It was possible that the runnable that fires an event to be
scheduled more than once while this should not happen. As
a result there was a crash since we did not expect to have
a second run and nullified a reference.

bug:9422804

Change-Id: I914e163b026cd217e1536ab0ed3a6b11113c2c73
parent 9f6bb77e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6449,8 +6449,8 @@ public final class ViewRootImpl implements ViewParent,
            final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastEventTimeMillis;
            final long minEventIntevalMillis =
                    ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
            if (timeSinceLastMillis >= minEventIntevalMillis) {
            mSource.removeCallbacks(this);
            if (timeSinceLastMillis >= minEventIntevalMillis) {
                run();
            } else {
                mSource.postDelayed(this, minEventIntevalMillis - timeSinceLastMillis);