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

Commit 141d489b authored by Tiger Huang's avatar Tiger Huang
Browse files

Fix WindowInsets#insetInsets

The logic didn't compare new{Side}s with the correct target. This CL
fixes it.

Fix: 396625222
Flag: EXEMPT bugfix
Test: CtsWindowManagerDeviceInsets:WindowInsetsTest
Change-Id: Ib2472173d1857c8c51b7fcad64fff90121e77dc4
parent cc83e680
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1290,7 +1290,8 @@ public final class WindowInsets {
        int newTop = Math.max(0, insets.top - top);
        int newRight = Math.max(0, insets.right - right);
        int newBottom = Math.max(0, insets.bottom - bottom);
        if (newLeft == left && newTop == top && newRight == right && newBottom == bottom) {
        if (newLeft == insets.left && newTop == insets.top
                && newRight == insets.right && newBottom == insets.bottom) {
            return insets;
        }
        return Insets.of(newLeft, newTop, newRight, newBottom);