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

Commit e6513486 authored by Gilles Debunne's avatar Gilles Debunne Committed by Android (Google) Code Review
Browse files

Merge "Minor tweak in getLocationInWindow"

parents 9cf8c86c 6583ce5b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -12220,13 +12220,16 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
     * @param location an array of two integers in which to hold the coordinates
     */
    public void getLocationInWindow(int[] location) {
        // When the view is not attached to a window, this method does not make sense
        if (mAttachInfo == null) return;
        if (location == null || location.length < 2) {
            throw new IllegalArgumentException("location must be an array of two integers");
        }
        if (mAttachInfo == null) {
            // When the view is not attached to a window, this method does not make sense
            location[0] = location[1] = 0;
            return;
        }
        float[] position = mAttachInfo.mTmpTransformLocation;
        position[0] = position[1] = 0.0f;