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

Commit 5daddbfc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Desks: Check desks exists before attempting to activate it" into main

parents e8fcafe4 c28ea9ea
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -3808,6 +3808,20 @@ class DesktopTasksController(
        remoteTransition: RemoteTransition? = null,
        taskIdToReorderToFront: Int? = null,
    ) {
        logD(
            "activateDesk deskId=%d taskIdToReorderToFront=%d remoteTransition=%s",
            deskId,
            taskIdToReorderToFront,
            remoteTransition,
        )
        if (!taskRepository.getAllDeskIds().contains(deskId)) {
            logW(
                "Request to activate desk=%d but desk not found for user=%d",
                deskId,
                taskRepository.userId,
            )
            return
        }
        if (
            taskIdToReorderToFront != null &&
                taskRepository.getDeskIdForTask(taskIdToReorderToFront) != deskId