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

Commit f6071154 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 43a8449b 7d432029
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -64,12 +64,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();
        }