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

Commit 4250dc6f authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Restrict moveToSplit calls to freeform tasks." into main

parents 3611676d a7dfb13e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -278,9 +278,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
            public void onTaskStageChanged(int taskId, @StageType int stage, boolean visible) {
                if (visible && stage != STAGE_TYPE_UNDEFINED) {
                    DesktopModeWindowDecoration decor = mWindowDecorByTaskId.get(taskId);
                    if (decor != null && DesktopModeStatus.canEnterDesktopMode(mContext)) {
                        mDesktopTasksController.moveToSplit(decor.mTaskInfo);
                    if (decor == null || !DesktopModeStatus.canEnterDesktopMode(mContext)
                            || decor.mTaskInfo.getWindowingMode() != WINDOWING_MODE_FREEFORM) {
                        return;
                    }
                    mDesktopTasksController.moveToSplit(decor.mTaskInfo);
                }
            }
        });