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

Commit 77bfe0a7 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Set default rotation in StatusBarWindowView to -1

So the view will update its orientation and padding when the
orientation is first reported as 0 (ROTATION_NONE)

Also handle case where an app may be letterboxing, so we should always
add padding to the StatusBarWindowViews based on the safe inset

Test: manual
Fixes: 151735145
Change-Id: Ic40f305ff8eb83fe16691842b8b3897bdaad157c
parent 6a68d3d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class PhoneStatusBarView extends PanelBar {
        }
    };
    private DarkReceiver mBattery;
    private int mRotationOrientation;
    private int mRotationOrientation = -1;
    @Nullable
    private View mCenterIconSpace;
    @Nullable
+5 −4
Original line number Diff line number Diff line
@@ -99,11 +99,12 @@ public class StatusBarWindowView extends FrameLayout {
        }

        // padding needed for corner cutout.
        int leftCornerCutoutPadding = 0;
        int rightCornerCutoutPadding = 0;
        int leftCornerCutoutPadding = cutout.getSafeInsetLeft();
        int rightCornerCutoutPadding = cutout.getSafeInsetRight();
        if (cornerCutoutPadding != null) {
            leftCornerCutoutPadding = cornerCutoutPadding.first;
            rightCornerCutoutPadding = cornerCutoutPadding.second;
            leftCornerCutoutPadding = Math.max(leftCornerCutoutPadding, cornerCutoutPadding.first);
            rightCornerCutoutPadding = Math.max(rightCornerCutoutPadding,
                    cornerCutoutPadding.second);
        }

        return new Pair<>(