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

Commit e1fd49b5 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Clean up stale fixed rotation state

This restores original logic that was not called in new transition
architecture. The fail safe condition is still needed to make
sure the windows won't wait for an outdated orientation switch.

Bug: 289196433
Test: Rapidly switch activities in different orientations. The
      system window should not disappear permanently.
Change-Id: Id1148dbfea349dad6c6057b24509bbc4e66ab1dd
parent c1cfc4a9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2751,6 +2751,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    void onAppTransitionDone() {
        super.onAppTransitionDone();
        mWmService.mWindowsChanged = true;
        onTransitionFinished();
    }

    void onTransitionFinished() {
        // If the transition finished callback cannot match the token for some reason, make sure the
        // rotated state is cleared if it is already invisible.
        if (mFixedRotationLaunchingApp != null && !mFixedRotationLaunchingApp.isVisibleRequested()
+1 −0
Original line number Diff line number Diff line
@@ -1298,6 +1298,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            if (asyncRotationController != null && containsChangeFor(dc, mTargets)) {
                asyncRotationController.onTransitionFinished();
            }
            dc.onTransitionFinished();
            if (hasParticipatedDisplay && dc.mDisplayRotationCompatPolicy != null) {
                final ChangeInfo changeInfo = mChanges.get(dc);
                if (changeInfo != null