From 10e340cb2aaa6adfb640ff9ef12021634868ce7f Mon Sep 17 00:00:00 2001 From: Phil Weaver Date: Mon, 7 Nov 2016 10:05:26 -0800 Subject: Throttle app a11y events in one place. We were throttling content changed a11y events both in View and in ViewRootImpl. This change eliminates the throttling in View, so events can be consolidated to reduce the number of IPCs. Change-Id: I1e1ecf1afc399e4103da82e6ed1779abfd3ec955 --- core/java/android/view/ViewGroup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/java/android/view/ViewGroup.java') diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 50593f28d9e3..54187d361b16 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3535,7 +3535,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager // 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); + notifyViewAccessibilityStateChangedIfNeeded( + AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE); } else if (mParent != null) { try { mParent.notifySubtreeAccessibilityStateChanged(this, source, changeType); -- cgit v1.2.3