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

Commit 5a2c8dbb authored by Matthew Mourgos's avatar Matthew Mourgos Committed by Android (Google) Code Review
Browse files

Merge "Avoid launching home intent on cleanup when home shown behind desktop" into main

parents 5a61ffe8 9e476782
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3248,10 +3248,11 @@ class DesktopTasksController(
                shouldEndUpAtHome,
            )
        }
        if (
            !skipWallpaperAndHomeOrdering ||
                !DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue
        ) {
        val shouldHandleWallpaperAndHome =
            (!skipWallpaperAndHomeOrdering ||
                !DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) &&
                !desktopState.shouldShowHomeBehindDesktop
        if (shouldHandleWallpaperAndHome) {
            if (ENABLE_DESKTOP_WALLPAPER_ACTIVITY_FOR_SYSTEM_USER.isTrue) {
                moveWallpaperActivityToBack(wct, displayId)
            } else {
+12 −0
Original line number Diff line number Diff line
@@ -4618,6 +4618,18 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        assertThat(wct.hierarchyOps).isEmpty()
    }
    @Test
    @EnableFlags(Flags.FLAG_SHOW_HOME_BEHIND_DESKTOP)
    fun onDesktopWindowClose_singleActiveTask_showHomeBehindDesktop_doesNotLaunchHome() {
        desktopState.shouldShowHomeBehindDesktop = true
        val task = setUpFreeformTask()
        val wct = WindowContainerTransaction()
        controller.onDesktopWindowClose(wct, displayId = DEFAULT_DISPLAY, task)
        wct.assertWithoutPendingIntent(launchHomeIntent(DEFAULT_DISPLAY))
    }
    @Test
    fun tilingBroken_onTaskMinimised() {
        val task = setUpFreeformTask()