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

Commit 37177f96 authored by Doris Liu's avatar Doris Liu Committed by Android (Google) Code Review
Browse files

Merge "Make sure the initial rotation is set" into gb-ub-photos-bryce

parents eda2f0ce bbbef74c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public class RotatableLayout extends FrameLayout {

    @Override
    public void onAttachedToWindow() {
        mPrevRotation = Util.getDisplayRotation((Activity) getContext());
        // check if there is any rotation before the view is attached to window
        int currentOrientation = getResources().getConfiguration().orientation;
        if (mInitialOrientation == currentOrientation) {
@@ -74,7 +75,6 @@ public class RotatableLayout extends FrameLayout {
                && currentOrientation == Configuration.ORIENTATION_LANDSCAPE) {
            rotateLayout(false);
        }
        mPrevRotation = Util.getDisplayRotation((Activity) getContext());
    }

    @Override