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

Commit 53b2ace1 authored by Jorge Gil's avatar Jorge Gil
Browse files

Implement removeAllDesks adb command

Flag: EXEMPT adb command
Fix: 393977386
Bug: 438144326
Test: adb shell dumpsys activity service SystemUIService WMShell
desktopmode removeAllDesks

Change-Id: Ie68b64a70bc7653926203219856f6f12c0d2e327
parent 1e1a9b1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ class DesktopModeShellCommandHandler(
            pw.println("Not supported.")
            return false
        }
        pw.println("Not implemented.")
        controller.removeAllDesks(exitReason = ExitReason.ADB_COMMAND_EXIT)
        return false
    }

+1 −0
Original line number Diff line number Diff line
@@ -5190,6 +5190,7 @@ class DesktopTasksController(

    /** Removes all the available desks on all displays. */
    fun removeAllDesks(userId: Int = shellController.currentUserId, exitReason: ExitReason) {
        logV("removeAllDesks userId=%d reason=%s", userId, exitReason)
        val repository = userRepositories.getProfile(userId)
        repository.getAllDeskIds().forEach { deskId ->
            removeDesk(deskId = deskId, userId = userId, exitReason = exitReason)