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

Commit 65719145 authored by Abodunrinwa Toki's avatar Abodunrinwa Toki Committed by android-build-merger
Browse files

Merge "Ensure that ViewGroup.getChildVisibleRect(...) is recursive." into nyc-dev am: 376f9f4b

am: 4fc4cf65

* commit '4fc4cf65':
  Ensure that ViewGroup.getChildVisibleRect(...) is recursive.

Change-Id: Iff1a4a674e02a9bc121961b0fa306d1b5afa32c8
parents 7ba17feb 4fc4cf65
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -5482,6 +5482,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
    }

    /**
     * @param forceParentCheck true to guarantee that this call will propagate to all ancestors,
     *      false otherwise
     *
     * @hide
     */
    public boolean getChildVisibleRect(
@@ -5541,8 +5544,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                (int) Math.ceil(rect.right), (int) Math.ceil(rect.bottom));

        if ((forceParentCheck || rectIsVisible) && mParent != null) {
            if (mParent instanceof ViewGroup) {
                rectIsVisible = ((ViewGroup) mParent)
                        .getChildVisibleRect(this, r, offset, forceParentCheck);
            } else {
                rectIsVisible = mParent.getChildVisibleRect(this, r, offset);
            }
        }
        return rectIsVisible;
    }