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

Commit 105ae5fb authored by Winson Chung's avatar Winson Chung
Browse files

Fixing issue with wrong stack being brought forward.

- Ensure that we only check the supoprtsPictureInPictureWhilePausing
  state when the activity state is actually pausing.

Bug: 35872668
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: If63b16919e1f4e8fb555a349809a9cdf2af7499b
parent a2f8f497
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2770,7 +2770,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
                // while pausing because that changes the focused stack and may prevent the new
                // starting activity from resuming.
                if (moveHomeStackToFront && task.getTaskToReturnTo() == HOME_ACTIVITY_TYPE
                        && !r.supportsPictureInPictureWhilePausing) {
                        && (r.state == RESUMED || !r.supportsPictureInPictureWhilePausing)) {
                    // Move the home stack forward if the task we just moved to the pinned stack
                    // was launched from home so home should be visible behind it.
                    moveHomeStackToFront(reason);