}
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);
}
mBoundingRect.setEmpty();
mBoundingPath.reset();
int newVisible;
- if (hasCutout()) {
+ if (shouldDrawCutout(getContext()) && hasCutout()) {
mBounds.set(mInfo.displayCutout.getBounds());
localBounds(mBoundingRect);
mInfo.displayCutout.getBounds().getBoundaryPath(mBoundingPath);