Loading core/java/android/view/DisplayCutout.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.view; import static android.util.DisplayMetrics.DENSITY_DEFAULT; import static android.util.DisplayMetrics.DENSITY_DEVICE_STABLE; import static android.view.DisplayCutoutProto.BOUNDS; import static android.view.DisplayCutoutProto.INSETS; Loading Loading @@ -358,7 +360,7 @@ public final class DisplayCutout { */ public static DisplayCutout fromResources(Resources res, int displayWidth, int displayHeight) { return fromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout), displayWidth, displayHeight, res.getDisplayMetrics().density); displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT); } /** Loading @@ -368,7 +370,7 @@ public final class DisplayCutout { */ public static Path pathFromResources(Resources res, int displayWidth, int displayHeight) { return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout), displayWidth, displayHeight, res.getDisplayMetrics().density).first; displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT).first; } /** Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -4809,6 +4809,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // For layout, the status bar is always at the top with our fixed height. displayFrames.mStable.top = displayFrames.mUnrestricted.top + mStatusBarHeightForRotation[displayFrames.mRotation]; // Make sure the status bar covers the entire cutout height displayFrames.mStable.top = Math.max(displayFrames.mStable.top, displayFrames.mDisplayCutoutSafe.top); // Tell the bar controller where the collapsed status bar content is mTmpRect.set(mStatusBar.getContentFrameLw()); Loading Loading
core/java/android/view/DisplayCutout.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.view; import static android.util.DisplayMetrics.DENSITY_DEFAULT; import static android.util.DisplayMetrics.DENSITY_DEVICE_STABLE; import static android.view.DisplayCutoutProto.BOUNDS; import static android.view.DisplayCutoutProto.INSETS; Loading Loading @@ -358,7 +360,7 @@ public final class DisplayCutout { */ public static DisplayCutout fromResources(Resources res, int displayWidth, int displayHeight) { return fromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout), displayWidth, displayHeight, res.getDisplayMetrics().density); displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT); } /** Loading @@ -368,7 +370,7 @@ public final class DisplayCutout { */ public static Path pathFromResources(Resources res, int displayWidth, int displayHeight) { return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout), displayWidth, displayHeight, res.getDisplayMetrics().density).first; displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT).first; } /** Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -4809,6 +4809,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // For layout, the status bar is always at the top with our fixed height. displayFrames.mStable.top = displayFrames.mUnrestricted.top + mStatusBarHeightForRotation[displayFrames.mRotation]; // Make sure the status bar covers the entire cutout height displayFrames.mStable.top = Math.max(displayFrames.mStable.top, displayFrames.mDisplayCutoutSafe.top); // Tell the bar controller where the collapsed status bar content is mTmpRect.set(mStatusBar.getContentFrameLw()); Loading