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

Commit 067b091d authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Accessibility query APIs report invisible views.

1. The accessibility querying APIs failed to check whether
   all predecessors of a view are visible before reporting it.

bug:6291855

Change-Id: I364a6f08e8d02c7105c00c9fdff0fec033829554
parent f21bea24
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));
    }