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

Commit 7d290304 authored by jorgegil@google.com's avatar jorgegil@google.com Committed by android-build-team Robot
Browse files

Don't skip cleaning up PIP state in onTaskVanished even if EXITING_PIP

onTaskVanished's clean up work is sometimes skipped when the current
state of PIP is EXITING_PIP because that is considered to be a "not
in pip state". Instead, make sure clean up does happen and only skip
it if the state is already UNDEFINED (i.e. if onTaskVanished is called
twice or before onTaskAppeared).

Bug: 176302696
Test: Enter PIP with maps, go back to fullscreen, make sure back gesture
works

Change-Id: I81e862f1d24892e565d1f8fcf2af0976caba7474
(cherry picked from commit 49ba723e)
parent 1e781e01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
     */
    @Override
    public void onTaskVanished(ActivityManager.RunningTaskInfo info) {
        if (!mState.isInPip()) {
        if (mState == State.UNDEFINED) {
            return;
        }
        final WindowContainerToken token = info.token;