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

Commit c41b32ba authored by Adrian Roos's avatar Adrian Roos
Browse files

ScreenDecorations: Only draw cutout if requested

Change-Id: I149e9f7d8b1ec7164e717f713731c618cf2772c0
Fixes: 77798197
Test: set config_fillMainBuiltInDisplayCutout=false, verify no soft cutout gets drawn.
parent 42a53783
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -207,7 +207,11 @@ public class ScreenDecorations extends SystemUI implements Tunable {
    }

    private boolean shouldDrawCutout() {
        return mContext.getResources().getBoolean(
        return shouldDrawCutout(mContext);
    }

    static boolean shouldDrawCutout(Context context) {
        return context.getResources().getBoolean(
                com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
    }

@@ -385,7 +389,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
            mBoundingRect.setEmpty();
            mBoundingPath.reset();
            int newVisible;
            if (hasCutout()) {
            if (shouldDrawCutout(getContext()) && hasCutout()) {
                mBounds.set(mInfo.displayCutout.getBounds());
                localBounds(mBoundingRect);
                mInfo.displayCutout.getBounds().getBoundaryPath(mBoundingPath);