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

Commit a0da1881 authored by Pragya Bajoria's avatar Pragya Bajoria
Browse files

Remove resolved TODO about remote transition from DesktopTasksController since...

Remove resolved TODO about remote transition from DesktopTasksController since it is now resolved with the wallpaper activity flag.

Add logging to identify scenarios where remote transition could be null.

Bug: b/352549219
Change-Id: If89b2f9aa38d13594dd69a1338dc37f091dfbd05
Flag: EXEMPT (trivial refactor)
parent 47d3c329
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -217,6 +217,15 @@ class DesktopTasksController(
        dragToDesktopTransitionHandler.setSplitScreenController(controller)
    }

    /** Returns the transition type for the given remote transition. */
    private fun transitionType(remoteTransition: RemoteTransition?): Int {
        if (remoteTransition == null) {
            ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: remoteTransition is null")
            return TRANSIT_NONE
        }
        return TRANSIT_TO_FRONT
    }

    /** Show all tasks, that are part of the desktop, on top of launcher */
    fun showDesktopApps(displayId: Int, remoteTransition: RemoteTransition? = null) {
        ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: showDesktopApps")
@@ -224,8 +233,7 @@ class DesktopTasksController(
        bringDesktopAppsToFront(displayId, wct)

        if (Transitions.ENABLE_SHELL_TRANSITIONS) {
            // TODO(b/309014605): ensure remote transition is supplied once state is introduced
            val transitionType = if (remoteTransition == null) TRANSIT_NONE else TRANSIT_TO_FRONT
            val transitionType = transitionType(remoteTransition)
            val handler =
                remoteTransition?.let {
                    OneShotRemoteHandler(transitions.mainExecutor, remoteTransition)