am 1e2b6438: Merge "Fix accessibility state callbacks" into klp-dev
* commit '1e2b64386f5d53415d547e06cc3c9040d8d506da': Fix accessibility state callbacks
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user