Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b57d616 authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "Reverting changes to the accessibility layer."

parents 9be7887b 11007143
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -5138,8 +5138,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @param text The announcement text.
     */
    public void announceForAccessibility(CharSequence text) {
        if (AccessibilityManager.getInstance(mContext).isEnabled() && mParent != null
                && isImportantForAccessibility()) {
        if (AccessibilityManager.getInstance(mContext).isEnabled() && mParent != null) {
            AccessibilityEvent event = AccessibilityEvent.obtain(
                    AccessibilityEvent.TYPE_ANNOUNCEMENT);
            onInitializeAccessibilityEvent(event);
@@ -5189,7 +5188,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * Note: Called from the default {@link AccessibilityDelegate}.
     */
    void sendAccessibilityEventUncheckedInternal(AccessibilityEvent event) {
        if (!isShown() || !isImportantForAccessibility()) {
        if (!isShown()) {
            return;
        }
        onInitializeAccessibilityEvent(event);
+5 −7
Original line number Diff line number Diff line
@@ -174,7 +174,6 @@ public class AccessibilityNodeInfoCache {
                    // subtrees in the cache.
                    // TODO: Runs in O(n^2), could optimize to O(n + n log n)
                    final LongArray newChildrenIds = info.getChildNodeIds();
                    if (newChildrenIds != null) {
                    final int oldChildCount = oldInfo.getChildCount();
                    for (int i = 0; i < oldChildCount; i++) {
                        final long oldChildId = oldInfo.getChildId(i);
@@ -182,7 +181,6 @@ public class AccessibilityNodeInfoCache {
                            clearSubTreeLocked(oldChildId);
                        }
                    }
                    }

                    // Also be careful if the parent has changed since the new
                    // parent may be a predecessor of the old parent which will