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

Commit 61c8fca6 authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille
Browse files

Stop using DesktopModeStatus in desktop mode e2e tests

Bug: 395863348
Test: atest MinimizeWindowOnAppOpen
Test: atest OpenUnlimitedApps
Flag: EXEMPT (refactor)
Change-Id: I1d71247a7d5a9c4fdf90508c37ebd88962ab3c26
parent 0a7ab7a8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
import com.android.server.wm.flicker.helpers.MailAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import com.android.wm.shell.shared.desktopmode.DesktopConfig
import org.junit.After
import org.junit.Assume
import org.junit.Before
@@ -38,8 +38,7 @@ import org.junit.Test
 * is 4.
 */
@Ignore("Test Base Class")
abstract class MinimizeWindowOnAppOpen() : TestScenarioBase()
{
abstract class MinimizeWindowOnAppOpen() : TestScenarioBase() {
    private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
    private val tapl = LauncherInstrumentation()
    private val wmHelper = WindowManagerStateHelper(instrumentation)
@@ -47,8 +46,9 @@ abstract class MinimizeWindowOnAppOpen() : TestScenarioBase()

    private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    private val mailApp = DesktopModeAppHelper(MailAppHelper(instrumentation))
    private val desktopConfig = DesktopConfig.fromContext(instrumentation.context)

    private val maxNum = DesktopModeStatus.getMaxTaskLimit(instrumentation.context)
    private val maxNum = desktopConfig.maxTaskLimit

    @Before
    fun setup() {
+4 −2
Original line number Diff line number Diff line
@@ -27,12 +27,13 @@ import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
import com.android.server.wm.flicker.helpers.MailAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import com.android.wm.shell.shared.desktopmode.DesktopConfig
import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.Ignore
import org.junit.Test

/**
 * Base scenario test for opening many apps on the device without the window limit.
 */
@@ -46,8 +47,9 @@ abstract class OpenUnlimitedApps() : TestScenarioBase()

    private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    private val mailApp = MailAppHelper(instrumentation)
    private val desktopConfig = DesktopConfig.fromContext(instrumentation.context)

    private val maxNum = DesktopModeStatus.getMaxTaskLimit(instrumentation.context)
    private val maxNum = desktopConfig.maxTaskLimit

    @Before
    fun setup() {