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

Commit 9349e65a authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Reset create state in moveTaskToStack

One could call moveTaskToStack with DOCKED_STACK as argument. In that
case, we also need to set the create state so it resets it to
something sane.

Change-Id: Ie6c1ea33e4ec3c4cd2a935dc186d2b496289946f
parent 1b12ef55
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ import static android.Manifest.permission.INTERACT_ACROSS_USERS;
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.Manifest.permission.MANAGE_ACTIVITY_STACKS;
import static android.Manifest.permission.START_TASKS_FROM_RECENTS;
import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT;
import static android.app.ActivityManager.RESIZE_MODE_PRESERVE_WINDOW;
import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
@@ -9344,6 +9345,10 @@ public final class ActivityManagerService extends ActivityManagerNative
            try {
                if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToStack: moving task=" + taskId
                        + " to stackId=" + stackId + " toTop=" + toTop);
                if (stackId == DOCKED_STACK_ID) {
                    mWindowManager.setDockedStackCreateState(DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT,
                            null /* initialBounds */);
                }
                mStackSupervisor.moveTaskToStackLocked(taskId, stackId, toTop, !FORCE_FOCUS,
                        "moveTaskToStack", ANIMATE);
            } finally {