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

Commit 8431f898 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Accessibility query APIs report invisible views."

parents b4bc99e8 067b091d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -5071,9 +5071,13 @@ public final class ViewRootImpl implements ViewParent,
     * @return Whether the view is visible on the screen.
     */
    private boolean isDisplayedOnScreen(View view) {
        // The first two checks are made also made by isShown() which
        // however traverses the tree up to the parent to catch that.
        // Therefore, we do some fail fast check to minimize the up
        // tree traversal.
        return (view.mAttachInfo != null
                && view.mAttachInfo.mWindowVisibility == View.VISIBLE
                && view.getVisibility() == View.VISIBLE
                && view.isShown()
                && view.getGlobalVisibleRect(mTempRect));
    }