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

Commit 99490ee0 authored by Jerry Chang's avatar Jerry Chang
Browse files

Fix not clearing split pair record after auto-enter pip

Due to the swipe-to-home and entering pip are in separate transitions.
The split record was not removed after startAnimation, updates to remove
it when identified in handleRequest.

Bug: 273410079
Test: repro steps of the bug
Change-Id: Iad54a3d87c1d926e4148c937712e45fdc44d6e82
parent dad2f513
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import static android.app.ComponentOptions.KEY_PENDING_INTENT_BACKGROUND_ACTIVIT
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.content.res.Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.RemoteAnimationTarget.MODE_OPENING;
@@ -2377,6 +2378,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                            + " so make sure split-screen state is cleaned-up. "
                            + "mainStageCount=%d sideStageCount=%d", mMainStage.getChildCount(),
                    mSideStage.getChildCount());
            if (triggerTask != null) {
                mRecentTasks.ifPresent(
                        recentTasks -> recentTasks.removeSplitPair(triggerTask.taskId));
            }
            prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, outWCT);
        }
    }
@@ -2765,7 +2770,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    for (TransitionInfo.Change change : info.getChanges()) {
                        final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
                        if (taskInfo != null
                                && taskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
                                && taskInfo.getWindowingMode() != WINDOWING_MODE_MULTI_WINDOW) {
                            recentTasks.removeSplitPair(taskInfo.taskId);
                        }
                    }