Merge "ScreenDecorations: Only draw cutout if requested" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
819fffaf1d
@@ -214,7 +214,11 @@ public class ScreenDecorations extends SystemUI implements Tunable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldDrawCutout() {
|
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);
|
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,7 +397,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
|
|||||||
mBoundingRect.setEmpty();
|
mBoundingRect.setEmpty();
|
||||||
mBoundingPath.reset();
|
mBoundingPath.reset();
|
||||||
int newVisible;
|
int newVisible;
|
||||||
if (hasCutout()) {
|
if (shouldDrawCutout(getContext()) && hasCutout()) {
|
||||||
mBounds.set(mInfo.displayCutout.getBounds());
|
mBounds.set(mInfo.displayCutout.getBounds());
|
||||||
localBounds(mBoundingRect);
|
localBounds(mBoundingRect);
|
||||||
updateBoundingPath();
|
updateBoundingPath();
|
||||||
|
|||||||
Reference in New Issue
Block a user