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

Commit 9f44eeae authored by Svetoslav's avatar Svetoslav
Browse files

Fix live region updates.

There is a sequence of update requests that put the logic
for sending live region events in a bad state where no events
are being sent anymore.

bug:15146442

Change-Id: Id53756ddfcc835f063bf9790e53c246296f9dc6e
parent 833dcd4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -20676,6 +20676,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            if (mPosted) {
            if (mPosted) {
                return;
                return;
            }
            }
            final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastEventTimeMillis;
            final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastEventTimeMillis;
            final long minEventIntevalMillis =
            final long minEventIntevalMillis =
                    ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
                    ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
@@ -20684,7 +20685,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                run();
                run();
            } else {
            } else {
                postDelayed(this, minEventIntevalMillis - timeSinceLastMillis);
                postDelayed(this, minEventIntevalMillis - timeSinceLastMillis);
                mPosted = true;
                mPostedWithDelay = true;
                mPostedWithDelay = true;
            }
            }
        }
        }