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

Commit 9713a5e8 authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

Fix warnings in DesktopTasksController

- Stop using the deprecated field
- Remove the unused method argument
- Remove unnecessary '?'

Flag: EXEMPT simple warning fixes
Bug: None
Test: m
Change-Id: I476379c3a4c7d25d42818733242194a55df0b28d
parent df2b4213
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ class DesktopTasksController(
                mainExecutor, rootTaskDisplayAreaOrganizer, remoteTransition, taskIdToMinimize)
        val t = transitions.startTransition(transitionType, wct, remoteTransitionHandler)
        remoteTransitionHandler.setTransition(t)
        taskIdToMinimize?.let { addPendingMinimizeTransition(t, it) }
        taskIdToMinimize.let { addPendingMinimizeTransition(t, it) }
        return t
    }

@@ -1250,10 +1250,7 @@ class DesktopTasksController(
                    // Check if freeform task launch during recents should be handled
                    shouldHandleMidRecentsFreeformLaunch -> handleMidRecentsFreeformTaskLaunch(task)
                    // Check if the closing task needs to be handled
                    TransitionUtil.isClosingType(request.type) -> handleTaskClosing(
                        task,
                        request.type
                    )
                    TransitionUtil.isClosingType(request.type) -> handleTaskClosing(task)
                    // Check if the top task shouldn't be allowed to enter desktop mode
                    isIncompatibleTask(task) -> handleIncompatibleTaskLaunch(task)
                    // Check if fullscreen task should be updated
@@ -1579,10 +1576,7 @@ class DesktopTasksController(
    }

    /** Handle task closing by removing wallpaper activity if it's the last active task */
    private fun handleTaskClosing(
        task: RunningTaskInfo,
        transitionType: Int
    ): WindowContainerTransaction? {
    private fun handleTaskClosing(task: RunningTaskInfo): WindowContainerTransaction? {
        logV("handleTaskClosing")
        if (!isDesktopModeShowing(task.displayId))
            return null
@@ -1603,7 +1597,7 @@ class DesktopTasksController(
        taskbarDesktopTaskListener?.onTaskbarCornerRoundingUpdate(
            doesAnyTaskRequireTaskbarRounding(
                task.displayId,
                task.id
                task.taskId
            )
        )
        return if (wct.isEmpty) null else wct