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

Commit 73fb1e0b authored by dakinola's avatar dakinola
Browse files

Amend MediaProjection Jank CUJs

Bug: 347373409
Flag: EXEMPT Refactor only
Test: manually built
Change-Id: I1e75acab0628f3ce17a2c49e4113acc4d0e76289
parent 2351a9de
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ open class StartAppMediaProjectionWithMaxDesktopWindows {

    @Test
    open fun startMediaProjection() {
        // TODO(b/366455106) - handle max task Limit
        mediaProjectionAppHelper.startSingleAppMediaProjection(wmHelper, targetApp)
        mailApp.launchViaIntent(wmHelper)
        simpleApp.launchViaIntent(wmHelper)
+3 −5
Original line number Diff line number Diff line
@@ -20,13 +20,12 @@ import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.tools.NavBar
import android.tools.Rotation
import android.tools.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.apphelpers.CalculatorAppHelper
import android.tools.flicker.rules.ChangeDisplayOrientationRule
import android.tools.traces.parsers.WindowManagerStateHelper
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.StartMediaProjectionAppHelper
import com.android.wm.shell.Utils
import org.junit.After
@@ -47,8 +46,7 @@ open class StartAppMediaProjectionWithDisplayRotations {

    private val initialRotation = Rotation.ROTATION_0
    private val targetApp = CalculatorAppHelper(instrumentation)
    private val mediaProjectionAppHelper = StartMediaProjectionAppHelper(instrumentation)
    private val testApp = DesktopModeAppHelper(mediaProjectionAppHelper)
    private val testApp = StartMediaProjectionAppHelper(instrumentation)

    @Rule
    @JvmField
@@ -63,7 +61,7 @@ open class StartAppMediaProjectionWithDisplayRotations {

    @Test
    open fun startMediaProjectionAndRotate() {
        mediaProjectionAppHelper.startSingleAppMediaProjection(wmHelper, targetApp)
        testApp.startSingleAppMediaProjection(wmHelper, targetApp)
        wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify()

        ChangeDisplayOrientationRule.setRotation(Rotation.ROTATION_90)
+2 −4
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.tools.traces.parsers.WindowManagerStateHelper
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.StartMediaProjectionAppHelper
import com.android.wm.shell.Utils
import org.junit.After
@@ -45,8 +44,7 @@ open class StartScreenMediaProjectionWithDisplayRotations {
    val device = UiDevice.getInstance(instrumentation)

    private val initialRotation = Rotation.ROTATION_0
    private val mediaProjectionAppHelper = StartMediaProjectionAppHelper(instrumentation)
    private val testApp = DesktopModeAppHelper(mediaProjectionAppHelper)
    private val testApp = StartMediaProjectionAppHelper(instrumentation)

    @Rule
    @JvmField
@@ -60,7 +58,7 @@ open class StartScreenMediaProjectionWithDisplayRotations {

    @Test
    open fun startMediaProjectionAndRotate() {
        mediaProjectionAppHelper.startEntireScreenMediaProjection(wmHelper)
        testApp.startEntireScreenMediaProjection(wmHelper)
        wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify()

        ChangeDisplayOrientationRule.setRotation(Rotation.ROTATION_90)