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

Commit 6e19a449 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Amend MediaProjection Jank CUJs" into main

parents df1ababb 73fb1e0b
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)