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

Commit 60f8e736 authored by dakinola's avatar dakinola
Browse files

Jank CUJ: Snap Resizing Non-Resizable

Bug: 339582583
Test: atest systemui-desktopmode-jank-suite -- --enable-module-dynamic-download --test-arg com.android.tradefed.testtype.AndroidJUnitTest:class:android.platform.test.scenario.sysui.desktopmode.SnapResizeNonResizableAppWindowRightWithButtonMicrobenchmark
Flag: TEST_ONLY
Change-Id: Iff11b450d870414b934e72a4658a2989ea8e412e
parent d3961dc3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
import com.android.server.wm.flicker.helpers.NonResizeableAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
import org.junit.After
@@ -36,13 +37,17 @@ import org.junit.runners.BlockJUnit4ClassRunner
@Postsubmit
open class SnapResizeAppWindowWithButton
@JvmOverloads
constructor(private val toLeft: Boolean = true) {
constructor(private val toLeft: Boolean = true, private val isResizable: Boolean = true) {

    private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
    private val tapl = LauncherInstrumentation()
    private val wmHelper = WindowManagerStateHelper(instrumentation)
    private val device = UiDevice.getInstance(instrumentation)
    private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    private val testApp = if (isResizable) {
        DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    } else {
        DesktopModeAppHelper(NonResizeableAppHelper(instrumentation))
    }

    @Before
    fun setup() {
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
import com.android.server.wm.flicker.helpers.NonResizeableAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
import org.junit.After
@@ -36,13 +37,17 @@ import org.junit.runners.BlockJUnit4ClassRunner
@Postsubmit
open class SnapResizeAppWindowWithDrag
@JvmOverloads
constructor(private val toLeft: Boolean = true) {
constructor(private val toLeft: Boolean = true, private val isResizable: Boolean = true) {

    private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
    private val tapl = LauncherInstrumentation()
    private val wmHelper = WindowManagerStateHelper(instrumentation)
    private val device = UiDevice.getInstance(instrumentation)
    private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    private val testApp = if (isResizable) {
        DesktopModeAppHelper(SimpleAppHelper(instrumentation))
    } else {
        DesktopModeAppHelper(NonResizeableAppHelper(instrumentation))
    }

    @Before
    fun setup() {