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

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

Merge "Add IDesktopMode multiple desktops APIs" into main

parents b2ba3f5a 898ff924
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -3014,6 +3014,14 @@ class DesktopTasksController(
            controller = null
        }

        override fun createDesk(displayId: Int) {
            // TODO: b/362720497 - Implement this API.
        }

        override fun activateDesk(deskId: Int, remoteTransition: RemoteTransition?) {
            // TODO: b/362720497 - Implement this API.
        }

        override fun showDesktopApps(displayId: Int, remoteTransition: RemoteTransition?) {
            executeRemoteCallWithTaskPermission(controller, "showDesktopApps") { c ->
                c.showDesktopApps(displayId, remoteTransition)
@@ -3041,17 +3049,6 @@ class DesktopTasksController(
            )
        }

        override fun getVisibleTaskCount(displayId: Int): Int {
            val result = IntArray(1)
            executeRemoteCallWithTaskPermission(
                controller,
                "visibleTaskCount",
                { controller -> result[0] = controller.visibleTaskCount(displayId) },
                /* blocking= */ true,
            )
            return result[0]
        }

        override fun onDesktopSplitSelectAnimComplete(taskInfo: RunningTaskInfo) {
            executeRemoteCallWithTaskPermission(controller, "onDesktopSplitSelectAnimComplete") { c
                ->
+5 −3
Original line number Diff line number Diff line
@@ -29,6 +29,11 @@ import com.android.wm.shell.desktopmode.IMoveToDesktopCallback;
 * Interface that is exposed to remote callers to manipulate desktop mode features.
 */
interface IDesktopMode {
    /** If possible, creates a new desk on the display whose ID is `displayId`. */
    oneway void createDesk(int displayId);

    /** Activates the desk whose ID is `deskId` on whatever display it currently exists on. */
    oneway void activateDesk(int deskId, in RemoteTransition remoteTransition);

    /** Show apps on the desktop on the given display */
    void showDesktopApps(int displayId, in RemoteTransition remoteTransition);
@@ -48,9 +53,6 @@ interface IDesktopMode {
    oneway void showDesktopApp(int taskId, in @nullable RemoteTransition remoteTransition,
            in DesktopTaskToFrontReason toFrontReason);

    /** Get count of visible desktop tasks on the given display */
    int getVisibleTaskCount(int displayId);

    /** Perform cleanup transactions after the animation to split select is complete */
    oneway void onDesktopSplitSelectAnimComplete(in RunningTaskInfo taskInfo);