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

Commit a9ac8354 authored by Doris Liu's avatar Doris Liu Committed by Android (Google) Code Review
Browse files

Merge "Clean up calls to Rect.intersect()" into mnc-dev

parents 626f0dc7 adb89214
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -46,7 +46,10 @@ class AccessibilityNodeInfoHelper {
        displayRect.right = width;
        displayRect.bottom = height;

        nodeRect.intersect(displayRect);
        if (nodeRect.intersect(displayRect)) {
            return nodeRect;
        } else {
            return new Rect();
        }
    }
}
+6 −2
Original line number Diff line number Diff line
@@ -353,8 +353,12 @@ public class UiObject {
        Rect parentRect = AccessibilityNodeInfoHelper
                .getVisibleBoundsInScreen(scrollableParentNode, w, h);
        // adjust for partial clipping of targeted by parent node if required
        nodeRect.intersect(parentRect);
        if (nodeRect.intersect(parentRect)) {
            return nodeRect;
        } else {
            // Node rect has no intersection with parent Rect
            return new Rect();
        }
    }

    /**