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

Commit 34eba833 authored by Daniel Norman's avatar Daniel Norman Committed by Android (Google) Code Review
Browse files

Revert "Stop dispatching TYPE_VIEW_SELECTED a11y event on child ..."

Revert submission 20920782-view-selected-parent-only

Reason for revert: Made another jank test worse somehow: http://b/265967298

Reverted changes: /q/submissionid:20920782-view-selected-parent-only

Change-Id: Iae4586e29c87a7b27a10ca639a0ac117b0f57cd8
parent c8f21b0c
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -25780,10 +25780,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @param selected true if the view must be selected, false otherwise
     */
    public void setSelected(boolean selected) {
        setSelected(selected, true);
    }
    void setSelected(boolean selected, boolean sendAccessibilityEvent) {
        //noinspection DoubleNegation
        if (((mPrivateFlags & PFLAG_SELECTED) != 0) != selected) {
            mPrivateFlags = (mPrivateFlags & ~PFLAG_SELECTED) | (selected ? PFLAG_SELECTED : 0);
@@ -25791,7 +25787,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            invalidate(true);
            refreshDrawableState();
            dispatchSetSelected(selected);
            if (sendAccessibilityEvent) {
            if (selected) {
                sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
            } else {
@@ -25800,7 +25795,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            }
        }
    }
    }
    /**
     * Dispatch setSelected to all of this View's children.
+1 −1
Original line number Diff line number Diff line
@@ -4629,7 +4629,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        final View[] children = mChildren;
        final int count = mChildrenCount;
        for (int i = 0; i < count; i++) {
            children[i].setSelected(selected, false);
            children[i].setSelected(selected);
        }
    }