Merge changes I478047cc,Ibe16ffd7 into pi-dev
am: 892ee93977
Change-Id: Id60ec23a210c907bf61a4f0c95441e5f48b773cc
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user