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

Commit 0572aace authored by Louis Chang's avatar Louis Chang
Browse files

Notify task stack changed when the transient launch committed

To keep the same behavior as the legacy launch-behind transition.

Bug: 268126002
Test: swipe up to home
Change-Id: Ib48c7c2c2cf45cb00d10b48abd8d1dcf5283fc88
parent b7b428cc
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -813,6 +813,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        }
        }


        boolean hasParticipatedDisplay = false;
        boolean hasParticipatedDisplay = false;
        boolean reportTaskStackChanged = false;
        // Commit all going-invisible containers
        // Commit all going-invisible containers
        for (int i = 0; i < mParticipants.size(); ++i) {
        for (int i = 0; i < mParticipants.size(); ++i) {
            final WindowContainer<?> participant = mParticipants.valueAt(i);
            final WindowContainer<?> participant = mParticipants.valueAt(i);
@@ -855,6 +856,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                        && ar.isVisible()) {
                        && ar.isVisible()) {
                    // Transient launch was committed, so report enteringAnimation
                    // Transient launch was committed, so report enteringAnimation
                    ar.mEnteringAnimation = true;
                    ar.mEnteringAnimation = true;
                    reportTaskStackChanged = true;

                    // Since transient launches don't automatically take focus, make sure we
                    // Since transient launches don't automatically take focus, make sure we
                    // synchronize focus since we committed to the launch.
                    // synchronize focus since we committed to the launch.
                    if (ar.isTopRunningActivity()) {
                    if (ar.isTopRunningActivity()) {
@@ -877,6 +880,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                }
                }
            }
            }
        }
        }

        if (reportTaskStackChanged) {
            mController.mAtm.getTaskChangeNotificationController().notifyTaskStackChanged();
        }

        // dispatch legacy callback in a different loop. This is because multiple legacy handlers
        // dispatch legacy callback in a different loop. This is because multiple legacy handlers
        // (fixed-rotation/displaycontent) make global changes, so we want to ensure that we've
        // (fixed-rotation/displaycontent) make global changes, so we want to ensure that we've
        // processed all the participants first (in particular, we want to trigger pip-enter first)
        // processed all the participants first (in particular, we want to trigger pip-enter first)