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

Commit bbbef74c authored by Doris Liu's avatar Doris Liu
Browse files

Make sure the initial rotation is set

Bug: 8718884
Change-Id: I4d1890f5dc9a4838b84872b1de395440757a7b4b
parent 2e7f1704
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