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

Commit faea0862 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix crash when PhoneStatusBarView has no cutout"

parents e36211c2 cda685db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public class PhoneStatusBarView extends PanelBar {
    };
    private DarkReceiver mBattery;
    private int mLastOrientation;
    @Nullable
    private View mCutoutSpace;
    @Nullable
    private DisplayCutout mDisplayCutout;
@@ -284,6 +285,11 @@ public class PhoneStatusBarView extends PanelBar {
    }

    private void updateCutoutLocation() {
        // Not all layouts have a cutout (e.g., Car)
        if (mCutoutSpace == null) {
            return;
        }

        if (mDisplayCutout == null || mDisplayCutout.isEmpty()
                    || mLastOrientation != ORIENTATION_PORTRAIT) {
            mCutoutSpace.setVisibility(View.GONE);