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

Commit 21c2c553 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge changes I478047cc,Ibe16ffd7 into pi-dev

am: 892ee939

Change-Id: Id60ec23a210c907bf61a4f0c95441e5f48b773cc
parents 8868d588 892ee939
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package android.view;
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.BOUNDS;
import static android.view.DisplayCutoutProto.INSETS;
import static android.view.DisplayCutoutProto.INSETS;


@@ -358,7 +360,7 @@ public final class DisplayCutout {
     */
     */
    public static DisplayCutout fromResources(Resources res, int displayWidth, int displayHeight) {
    public static DisplayCutout fromResources(Resources res, int displayWidth, int displayHeight) {
        return fromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
        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) {
    public static Path pathFromResources(Resources res, int displayWidth, int displayHeight) {
        return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
        return pathAndDisplayCutoutFromSpec(res.getString(R.string.config_mainBuiltInDisplayCutout),
                displayWidth, displayHeight, res.getDisplayMetrics().density).first;
                displayWidth, displayHeight, DENSITY_DEVICE_STABLE / (float) DENSITY_DEFAULT).first;
    }
    }


    /**
    /**
+3 −0
Original line number Original line Diff line number Diff line
@@ -4809,6 +4809,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        // For layout, the status bar is always at the top with our fixed height.
        // For layout, the status bar is always at the top with our fixed height.
        displayFrames.mStable.top = displayFrames.mUnrestricted.top
        displayFrames.mStable.top = displayFrames.mUnrestricted.top
                + mStatusBarHeightForRotation[displayFrames.mRotation];
                + 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
        // Tell the bar controller where the collapsed status bar content is
        mTmpRect.set(mStatusBar.getContentFrameLw());
        mTmpRect.set(mStatusBar.getContentFrameLw());