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

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

Merge "Refactor to follow kotlin style" into main

parents 8e04ac32 bb8eb2aa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ class DesktopTasksController(
        )
        val wct = WindowContainerTransaction()
        exitSplitIfApplicable(wct, taskInfo)
        moveHomeTask(wct, true /* toTop */)
        moveHomeTask(wct, toTop = true)
        val taskToMinimize =
            bringDesktopAppsToFrontBeforeShowingNewTask(taskInfo.displayId, wct, taskInfo.taskId)
        addMoveToDesktopChanges(wct, taskInfo)
@@ -795,7 +795,7 @@ class DesktopTasksController(
            addWallpaperActivity(wct)
        } else {
            // Move home to front
            moveHomeTask(wct, true /* toTop */)
            moveHomeTask(wct, toTop = true)
        }

        val nonMinimizedTasksOrderedFrontToBack =
@@ -1042,7 +1042,7 @@ class DesktopTasksController(
                addMoveToDesktopChanges(wct, task)
                // In some launches home task is moved behind new task being launched. Make sure
                // that's not the case for launches in desktop.
                moveHomeTask(wct, false /* toTop */)
                moveHomeTask(wct, toTop = false)
                // Desktop Mode is already showing and we're launching a new Task - we might need to
                // minimize another Task.
                val taskToMinimize = addAndGetMinimizeChangesIfNeeded(task.displayId, wct, task)
+4 −2
Original line number Diff line number Diff line
@@ -1093,10 +1093,12 @@ class DesktopTasksControllerTest : ShellTestCase() {
    val fullscreenTask = createFullscreenTask()

    val wct = controller.handleRequest(Binder(), createTransition(fullscreenTask))
    assertThat(wct?.changes?.get(fullscreenTask.token.asBinder())?.windowingMode)

    assertNotNull(wct, "should handle request")
    assertThat(wct.changes[fullscreenTask.token.asBinder()]?.windowingMode)
        .isEqualTo(WINDOWING_MODE_FREEFORM)

    assertThat(wct!!.hierarchyOps.size).isEqualTo(2)
    assertThat(wct.hierarchyOps).hasSize(2)
    wct.assertReorderAt(1, homeTask, toTop = false)
  }