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

Commit 3e51f9a3 authored by Toshiki Kikuchi's avatar Toshiki Kikuchi
Browse files

Add activity state check to minimizeDesktopApp

This CL makes minimizeDesktopApp to check the activity goes to a stopped state properly.

Bug: 376603060
Flag: EXEMPT add test
Test: atest PlatformScenarioTests:com.android.wm.shell.functional.MinimizeAppWindowsTest
Change-Id: Ie198fe0774a0af01d0efcfc97ce994e06ff0e257
parent 0e235460
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.graphics.Rect
import android.graphics.Region
import android.os.SystemClock
import android.platform.uiautomatorhelpers.DeviceHelpers
import android.tools.PlatformConsts
import android.tools.device.apphelpers.IStandardAppHelper
import android.tools.helpers.SYSTEMUI_PACKAGE
import android.tools.traces.parsers.WindowManagerStateHelper
@@ -163,7 +164,10 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
            .StateSyncBuilder()
            .withAppTransitionIdle()
            .apply {
                if (isPip) withPipShown() else withWindowSurfaceDisappeared(innerHelper)
                if (isPip) withPipShown()
                else
                    withWindowSurfaceDisappeared(innerHelper)
                        .withActivityState(innerHelper, PlatformConsts.STATE_STOPPED)
            }
            .waitForAndVerify()
    }