Merge "Skip AppPairs and LegacySplit flicker tests when Shell transition is on" into sc-v2-dev
This commit is contained in:
@@ -22,7 +22,10 @@ import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
|
||||
import com.android.wm.shell.flicker.helpers.BaseAppHelper.Companion.isShellTransitionsEnabled
|
||||
import com.android.wm.shell.flicker.helpers.SplitScreenHelper
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
abstract class RotateTwoLaunchedAppsTransition(
|
||||
@@ -52,6 +55,13 @@ abstract class RotateTwoLaunchedAppsTransition(
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
override fun setup() {
|
||||
// AppPairs hasn't been updated to Shell Transition. There will be conflict on rotation.
|
||||
assumeFalse(isShellTransitionsEnabled())
|
||||
super.setup()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
override fun navBarLayerIsAlwaysVisible() {
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.app.Instrumentation
|
||||
import android.content.ComponentName
|
||||
import android.content.pm.PackageManager.FEATURE_LEANBACK
|
||||
import android.content.pm.PackageManager.FEATURE_LEANBACK_ONLY
|
||||
import android.os.SystemProperties
|
||||
import android.support.test.launcherhelper.LauncherStrategyFactory
|
||||
import android.util.Log
|
||||
import androidx.test.uiautomator.By
|
||||
@@ -60,6 +61,9 @@ abstract class BaseAppHelper(
|
||||
companion object {
|
||||
private const val APP_CLOSE_WAIT_TIME_MS = 3_000L
|
||||
|
||||
fun isShellTransitionsEnabled() =
|
||||
SystemProperties.getBoolean("persist.debug.shell_transit", false)
|
||||
|
||||
fun executeShellCommand(instrumentation: Instrumentation, cmd: String) {
|
||||
try {
|
||||
SystemUtil.runShellCommand(instrumentation, cmd)
|
||||
|
||||
@@ -32,10 +32,12 @@ import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
|
||||
import com.android.server.wm.flicker.repetitions
|
||||
import com.android.server.wm.flicker.startRotation
|
||||
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
|
||||
import com.android.wm.shell.flicker.helpers.BaseAppHelper.Companion.isShellTransitionsEnabled
|
||||
import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.getDevEnableNonResizableMultiWindow
|
||||
import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.setDevEnableNonResizableMultiWindow
|
||||
import com.android.wm.shell.flicker.helpers.SplitScreenHelper
|
||||
import org.junit.After
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@@ -52,6 +54,8 @@ abstract class LegacySplitScreenTransition(protected val testSpec: FlickerTestPa
|
||||
|
||||
@Before
|
||||
open fun setup() {
|
||||
// Legacy split is having some issue with Shell transition, and will be deprecated soon.
|
||||
assumeFalse(isShellTransitionsEnabled())
|
||||
prevDevEnableNonResizableMultiWindow = getDevEnableNonResizableMultiWindow(context)
|
||||
if (prevDevEnableNonResizableMultiWindow != 0) {
|
||||
// Turn off the development option
|
||||
|
||||
Reference in New Issue
Block a user