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

Commit 67f2f46c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix]Use local width and height to get cutout in the target...

Merge "[Bugfix]Use local width and height to get cutout in the target direction" into main am: f6071154

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3554263



Change-Id: I67ba90a53dff8fe79ca69c3bad472a911303f0ae
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ee510382 f6071154
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -66,12 +66,14 @@ public final class SystemBarUtils {
        display.getDisplayInfo(info);
        Insets insets;
        Insets waterfallInsets;
        final int localWidth = context.getResources().getDisplayMetrics().widthPixels;
        final int localHeight = context.getResources().getDisplayMetrics().heightPixels;
        if (cutout == null) {
            insets = Insets.NONE;
            waterfallInsets = Insets.NONE;
        } else {
            DisplayCutout rotated =
                    cutout.getRotated(info.logicalWidth, info.logicalHeight, rotation, targetRot);
                    cutout.getRotated(localWidth, localHeight, rotation, targetRot);
            insets = Insets.of(rotated.getSafeInsets());
            waterfallInsets = rotated.getWaterfallInsets();
        }