diff options
author | Alan Viverette <alanv@google.com> | 2013-10-09 17:20:43 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2013-10-09 17:20:43 -0700 |
commit | 7e361d22e3ceb7dac79acd1cf3567de86eb045bc (patch) | |
tree | 2873995ed107a78fcfd6669c6fa34c34ea544498 /core/java/android/view/accessibility | |
parent | f681058f2dc08ebfbde93f30b160d5d53f104c99 (diff) | |
download | frameworks_base-7e361d22e3ceb7dac79acd1cf3567de86eb045bc.zip frameworks_base-7e361d22e3ceb7dac79acd1cf3567de86eb045bc.tar.gz frameworks_base-7e361d22e3ceb7dac79acd1cf3567de86eb045bc.tar.bz2 |
Fix accessibility state callbacks
BUG: 11141708
Change-Id: Ieff1fb90c4f894eba3c203089dd61e1dabdb7982
Diffstat (limited to 'core/java/android/view/accessibility')
-rw-r--r-- | core/java/android/view/accessibility/AccessibilityManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java index 2e8f1a2..00f4adb 100644 --- a/core/java/android/view/accessibility/AccessibilityManager.java +++ b/core/java/android/view/accessibility/AccessibilityManager.java @@ -415,14 +415,18 @@ public final class AccessibilityManager { final boolean touchExplorationEnabled = (stateFlags & STATE_FLAG_TOUCH_EXPLORATION_ENABLED) != 0; synchronized (mHandler) { + final boolean wasEnabled = mIsEnabled; + final boolean wasTouchExplorationEnabled = mIsTouchExplorationEnabled; + + // Ensure listeners get current state from isZzzEnabled() calls. mIsEnabled = enabled; mIsTouchExplorationEnabled = touchExplorationEnabled; - if (enabled != mIsEnabled) { + if (wasEnabled != enabled) { notifyAccessibilityStateChangedLh(); } - if (touchExplorationEnabled != mIsTouchExplorationEnabled) { + if (wasTouchExplorationEnabled != touchExplorationEnabled) { notifyTouchExplorationStateChangedLh(); } } |