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

Commit 4fc4c105 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Allow caller dismissing split to specify top stack" into rvc-dev am:...

Merge "Allow caller dismissing split to specify top stack" into rvc-dev am: 3c5ea9cd am: 49f28799 am: e467c142

Change-Id: Ib8b4908f68ec10fd42670a128116f05f65815484
parents 21269c64 e467c142
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -757,7 +757,7 @@ class ActivityStack extends Task {
                // warning toast about it.
                mAtmService.getTaskChangeNotificationController()
                        .notifyActivityDismissingDockedStack();
                taskDisplayArea.onSplitScreenModeDismissed();
                taskDisplayArea.onSplitScreenModeDismissed(this);
            }
        }

+1 −1
Original line number Diff line number Diff line
@@ -2198,7 +2198,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                // split-screen in split-screen.
                mService.getTaskChangeNotificationController()
                        .notifyActivityDismissingDockedStack();
                taskDisplayArea.onSplitScreenModeDismissed();
                taskDisplayArea.onSplitScreenModeDismissed(task.getStack());
                taskDisplayArea.mDisplayContent.ensureActivitiesVisible(null, 0, PRESERVE_WINDOWS,
                        true /* notifyClients */);
            }
+9 −3
Original line number Diff line number Diff line
@@ -1165,17 +1165,23 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> {
    }

    void onSplitScreenModeDismissed() {
        onSplitScreenModeDismissed(null /* toTop */);
    }

    void onSplitScreenModeDismissed(ActivityStack toTop) {
        mAtmService.deferWindowLayout();
        try {
            mLaunchRootTask = null;
            moveSplitScreenTasksToFullScreen();
        } finally {
            final ActivityStack topFullscreenStack =
                    getTopStackInWindowingMode(WINDOWING_MODE_FULLSCREEN);
            final ActivityStack topFullscreenStack = toTop != null
                    ? toTop : getTopStackInWindowingMode(WINDOWING_MODE_FULLSCREEN);
            final ActivityStack homeStack = getOrCreateRootHomeTask();
            if (topFullscreenStack != null && homeStack != null && !isTopStack(homeStack)) {
            if (homeStack != null && ((topFullscreenStack != null && !isTopStack(homeStack))
                    || toTop != null)) {
                // Whenever split-screen is dismissed we want the home stack directly behind the
                // current top fullscreen stack so it shows up when the top stack is finished.
                // Or, if the caller specified a stack to be on top after split-screen is dismissed.
                // TODO: Would be better to use ActivityDisplay.positionChildAt() for this, however
                // ActivityDisplay doesn't have a direct controller to WM side yet. We can switch
                // once we have that.