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

Commit 19c85406 authored by Winson Chung's avatar Winson Chung
Browse files

Fixing issue with activity incorrectly auto-entering PiP.

- When the PiP menu activity was brought forward, we were inadvertently
  setting the auto-enter supported flag for the PiP base activity as
  well, which would trigger auto-enter PiP once the activity is moved
  back to fullscreen and then subsequently finished.

Bug: 36352343
Bug: 36364010
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Id1b800bf392d03b55562fb13374e33a5ff0ebda6
parent 974b5b13
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2795,7 +2795,8 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
                    } else {
                        // If a new task is being launched, then mark the existing top activity as
                        // supporting picture-in-picture while pausing
                        if (focusedTopActivity != null) {
                        if (focusedTopActivity != null &&
                                focusedTopActivity.getStack().getStackId() != PINNED_STACK_ID) {
                            focusedTopActivity.supportsPictureInPictureWhilePausing = true;
                        }
                        transit = TRANSIT_TASK_OPEN;
@@ -4403,7 +4404,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
        }
        // If a new task is moved to the front, then mark the existing top activity as supporting
        // picture-in-picture while paused
        if (topActivity != null) {
        if (topActivity != null && topActivity.getStack().getStackId() != PINNED_STACK_ID) {
            topActivity.supportsPictureInPictureWhilePausing = true;
        }