summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-06-18 14:43:43 -0700
committerSvetoslav <svetoslavganov@google.com>2013-06-18 14:43:47 -0700
commite89f48bfb1ed3a2e9241052b665a41fd2a8898cb (patch)
tree55a208dac7359f9e5c0535574df5705627dda2aa /core/java/android/view/ViewRootImpl.java
parent9f6bb77eb61a465f13147ada9a920d7ba9567c92 (diff)
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
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 109b8e00ea46..9ec90ef4d186 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -6449,8 +6449,8 @@ public final class ViewRootImpl implements ViewParent,
final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastEventTimeMillis;
final long minEventIntevalMillis =
ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
+ mSource.removeCallbacks(this);
if (timeSinceLastMillis >= minEventIntevalMillis) {
- mSource.removeCallbacks(this);
run();
} else {
mSource.postDelayed(this, minEventIntevalMillis - timeSinceLastMillis);