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

Commit 36905507 authored by Andrii Kulian's avatar Andrii Kulian Committed by android-build-merger
Browse files

Don't let top activity to influence the orientation

am: 0918d367

Change-Id: Ib75b8859f6bfbb034c1cd74f5f21cbae73da17c9
parents 5823043e 0918d367
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1297,7 +1297,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        // going to the bottom. Allowing closing {@link AppWindowToken} to participate can lead to
        // an Activity in another task being started in the wrong orientation during the transition.
        if (!(sendingToBottom || mService.mClosingApps.contains(this))
                && (isVisible() || mService.mOpeningApps.contains(this) || isOnTop())) {
                && (isVisible() || mService.mOpeningApps.contains(this))) {
            return mOrientation;
        }

+0 −5
Original line number Diff line number Diff line
@@ -202,11 +202,6 @@ public class AppWindowTokenTests extends WindowTestsBase {
        assertEquals(SCREEN_ORIENTATION_UNSET, mToken.getOrientation());
        // Can specify orientation if the current orientation candidate is orientation behind.
        assertEquals(SCREEN_ORIENTATION_LANDSCAPE, mToken.getOrientation(SCREEN_ORIENTATION_BEHIND));

        mToken.sendingToBottom = false;
        mToken.setIsOnTop(true);
        // Allow for mToken to provide orientation hidden if on top and not being sent to bottom.
        assertEquals(SCREEN_ORIENTATION_LANDSCAPE, mToken.getOrientation());
    }

    @Test