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

Commit d7388a82 authored by wilsonshih's avatar wilsonshih
Browse files

Fix starting window stuck because of the remove status.

Regression from ag/24405299.
There can be another collecting transition happen while previous
transaction commit. So there should not reset the
mRemoveAfterTransaction during onSyncTransactionCommitted.

Bug: 295458327
Test: launch app from portrait to landscape directly. Verify the
starting window would be removed after the rotation transition finish

Change-Id: Ib10aa0ecf67ca3905afc4e87bdb86eb56b81bfb6
parent fae78ad7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -225,7 +225,6 @@ import static com.android.server.wm.IdentifierProto.USER_ID;
import static com.android.server.wm.LetterboxConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
import static com.android.server.wm.LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_COPY_TO_CLIENT;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_IDLE;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_REMOVE_DIRECTLY;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_PREDICT_BACK;
@@ -2861,7 +2860,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        } else if (lastData.mRemoveAfterTransaction == AFTER_TRANSACTION_COPY_TO_CLIENT) {
            removeStartingWindow();
        }
        lastData.mRemoveAfterTransaction = AFTER_TRANSACTION_IDLE;
    }

    void removeStartingWindowAnimation(boolean prepareAnimation) {
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public abstract class StartingData {
     * This starting window should be removed after applying the start transaction of transition,
     * which ensures the app window has shown.
     */
    @AfterTransaction int mRemoveAfterTransaction;
    @AfterTransaction int mRemoveAfterTransaction = AFTER_TRANSACTION_IDLE;

    /** Whether to prepare the removal animation. */
    boolean mPrepareRemoveAnimation;