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

Commit b5f4ff76 authored by Milton Wu's avatar Milton Wu Committed by Automerger Merge Worker
Browse files

Merge "Rounded corner not align to right on land" into tm-dev am: d159f721...

Merge "Rounded corner not align to right on land" into tm-dev am: d159f721 am: ce2aacfb am: c238347f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17983783



Change-Id: Id18e12b387e4009559a1ad0bfd43eccec673ac73
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c6b40282 c238347f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -380,7 +380,7 @@ class ScreenDecorHwcLayer(context: Context, displayDecorationSupport: DisplayDec
    ) {
    ) {
        if (hasTopRoundedCorner == hasTop &&
        if (hasTopRoundedCorner == hasTop &&
                hasBottomRoundedCorner == hasBottom &&
                hasBottomRoundedCorner == hasBottom &&
                roundedCornerBottomSize == bottomSize &&
                roundedCornerTopSize == topSize &&
                roundedCornerBottomSize == bottomSize) {
                roundedCornerBottomSize == bottomSize) {
            return
            return
        }
        }
+9 −6
Original line number Original line Diff line number Diff line
@@ -348,7 +348,8 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
            @Override
            @Override
            public void onDisplayChanged(int displayId) {
            public void onDisplayChanged(int displayId) {
                final int newRotation = mContext.getDisplay().getRotation();
                final int newRotation = mContext.getDisplay().getRotation();
                if (mOverlays != null && mRotation != newRotation) {
                if ((mOverlays != null || mScreenDecorHwcWindow != null)
                        && mRotation != newRotation) {
                    // We cannot immediately update the orientation. Otherwise
                    // We cannot immediately update the orientation. Otherwise
                    // WindowManager is still deferring layout until it has finished dispatching
                    // WindowManager is still deferring layout until it has finished dispatching
                    // the config changes, which may cause divergence between what we draw
                    // the config changes, which may cause divergence between what we draw
@@ -362,6 +363,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
                                + mRotation);
                                + mRotation);
                    }
                    }


                    if (mOverlays != null) {
                        for (int i = 0; i < BOUNDS_POSITION_LENGTH; i++) {
                        for (int i = 0; i < BOUNDS_POSITION_LENGTH; i++) {
                            if (mOverlays[i] != null) {
                            if (mOverlays[i] != null) {
                                final ViewGroup overlayView = mOverlays[i].getRootView();
                                final ViewGroup overlayView = mOverlays[i].getRootView();
@@ -369,6 +371,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
                                        new RestartingPreDrawListener(overlayView, i, newRotation));
                                        new RestartingPreDrawListener(overlayView, i, newRotation));
                            }
                            }
                        }
                        }
                    }


                    if (mScreenDecorHwcWindow != null) {
                    if (mScreenDecorHwcWindow != null) {
                        mScreenDecorHwcWindow.getViewTreeObserver().addOnPreDrawListener(
                        mScreenDecorHwcWindow.getViewTreeObserver().addOnPreDrawListener(
+1 −1
Original line number Original line Diff line number Diff line
@@ -105,7 +105,7 @@ private fun Int.toLayoutGravity(@Surface.Rotation rotation: Int): Int = when (ro
        DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.BOTTOM
        DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.BOTTOM
        DisplayCutout.BOUNDS_POSITION_TOP -> Gravity.LEFT
        DisplayCutout.BOUNDS_POSITION_TOP -> Gravity.LEFT
        DisplayCutout.BOUNDS_POSITION_RIGHT -> Gravity.TOP
        DisplayCutout.BOUNDS_POSITION_RIGHT -> Gravity.TOP
        else /* DisplayCutout.BOUNDS_POSITION_BOTTOM */ -> Gravity.LEFT
        else /* DisplayCutout.BOUNDS_POSITION_BOTTOM */ -> Gravity.RIGHT
    }
    }
    Surface.ROTATION_270 -> when (this) {
    Surface.ROTATION_270 -> when (this) {
        DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.TOP
        DisplayCutout.BOUNDS_POSITION_LEFT -> Gravity.TOP