diff options
author | Alan Viverette <alanv@google.com> | 2013-09-12 17:16:09 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2013-09-12 17:16:09 -0700 |
commit | 77e9a28e2faa36f127231b842476d47f9823a83a (patch) | |
tree | 5637fce8e0565cc1fdd5f0367f38097a472ca6d6 /core/java/android/view/ViewGroup.java | |
parent | 14e55996722db1e74996b837c136a6e188143718 (diff) | |
download | frameworks_base-77e9a28e2faa36f127231b842476d47f9823a83a.zip frameworks_base-77e9a28e2faa36f127231b842476d47f9823a83a.tar.gz frameworks_base-77e9a28e2faa36f127231b842476d47f9823a83a.tar.bz2 |
Add live region politeness to View, AccessibilityNodeInfo
Alters the content change API to contain a bit mask of types of
changes represented by the event. Live regions send CONTENT_CHANGED
events immediately. Removes unused APIs for EXPANDABLE/EXPANDED.
BUG: 10527284
Change-Id: I21523e85e47df23706976dc0a8bf615f83072c04
Diffstat (limited to 'core/java/android/view/ViewGroup.java')
-rw-r--r-- | core/java/android/view/ViewGroup.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index faeee3f..9414237 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -38,6 +38,7 @@ import android.util.Log; import android.util.Pools.SynchronizedPool; import android.util.SparseArray; import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.Animation; import android.view.animation.AnimationUtils; @@ -2528,10 +2529,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override - public void childAccessibilityStateChanged(View root) { - if (mParent != null) { + public void notifySubtreeAccessibilityStateChanged(View child, View source, int changeType) { + // If this is a live region, we should send a subtree change event + // from this view. Otherwise, we can let it propagate up. + if (getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE) { + notifyViewAccessibilityStateChangedIfNeeded(changeType); + } else if (mParent != null) { try { - mParent.childAccessibilityStateChanged(root); + mParent.notifySubtreeAccessibilityStateChanged(this, source, changeType); } catch (AbstractMethodError e) { Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() + " does not fully implement ViewParent", e); |