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

Commit df449d71 authored by Alex Chau's avatar Alex Chau
Browse files

Update RecentsActivityRotation when device rotate

- When rotating device, RecentsOrientedState.setRecentsRotation is called without updating mRecentsActivityRotation, leaving a stale orientation to be used by other components

Bug: 176913754
Change-Id: Ieb7b6cd31a6f77809ac6d222b8d0d68d6015ce01
parent f8f65956
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,6 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre
     */
    public boolean update(
            @SurfaceRotation int touchRotation, @SurfaceRotation int displayRotation) {
        mRecentsActivityRotation = inferRecentsActivityRotation(displayRotation);
        mDisplayRotation = displayRotation;
        mTouchRotation = touchRotation;
        mPreviousRotation = touchRotation;
@@ -206,6 +205,7 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre
    }

    private boolean updateHandler() {
        mRecentsActivityRotation = inferRecentsActivityRotation(mDisplayRotation);
        if (mRecentsActivityRotation == mTouchRotation
                || (canRecentsActivityRotate() && (mFlags & FLAG_SWIPE_UP_NOT_RUNNING) != 0)) {
            mOrientationHandler = PagedOrientationHandler.PORTRAIT;