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

Commit 58056cf0 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: 03e7feeb

* commit '03e7feeb':
  Ensure that ViewGroup.getChildVisibleRect(...) is recursive.

Change-Id: If5557d0a968e263b4252566566621b522ffb5617
parents 7ba17feb 03e7feeb
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line 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
     * @hide
     */
     */
    public boolean getChildVisibleRect(
    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));
                (int) Math.ceil(rect.right), (int) Math.ceil(rect.bottom));


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