Merge "Only run legacy split flicker tests when it is using legacy split" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fc7ff7b7e2
@@ -18,6 +18,7 @@ package com.android.wm.shell.flicker.helpers
|
|||||||
|
|
||||||
import android.app.Instrumentation
|
import android.app.Instrumentation
|
||||||
import android.content.ComponentName
|
import android.content.ComponentName
|
||||||
|
import android.content.res.Resources
|
||||||
import com.android.wm.shell.flicker.testapp.Components
|
import com.android.wm.shell.flicker.testapp.Components
|
||||||
|
|
||||||
class SplitScreenHelper(
|
class SplitScreenHelper(
|
||||||
@@ -30,6 +31,11 @@ class SplitScreenHelper(
|
|||||||
const val TEST_REPETITIONS = 1
|
const val TEST_REPETITIONS = 1
|
||||||
const val TIMEOUT_MS = 3_000L
|
const val TIMEOUT_MS = 3_000L
|
||||||
|
|
||||||
|
// TODO: remove all legacy split screen flicker tests when legacy split screen is fully
|
||||||
|
// deprecated.
|
||||||
|
fun isUsingLegacySplit(): Boolean =
|
||||||
|
Resources.getSystem().getBoolean(com.android.internal.R.bool.config_useLegacySplit)
|
||||||
|
|
||||||
fun getPrimary(instrumentation: Instrumentation): SplitScreenHelper =
|
fun getPrimary(instrumentation: Instrumentation): SplitScreenHelper =
|
||||||
SplitScreenHelper(instrumentation,
|
SplitScreenHelper(instrumentation,
|
||||||
Components.SplitScreenActivity.LABEL,
|
Components.SplitScreenActivity.LABEL,
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.setDevEn
|
|||||||
import com.android.wm.shell.flicker.helpers.SplitScreenHelper
|
import com.android.wm.shell.flicker.helpers.SplitScreenHelper
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Assume.assumeFalse
|
import org.junit.Assume.assumeFalse
|
||||||
|
import org.junit.Assume.assumeTrue
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
@@ -56,6 +57,8 @@ abstract class LegacySplitScreenTransition(protected val testSpec: FlickerTestPa
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
open fun setup() {
|
open fun setup() {
|
||||||
|
// Only run legacy split tests when the system is using legacy split screen.
|
||||||
|
assumeTrue(SplitScreenHelper.isUsingLegacySplit())
|
||||||
// Legacy split is having some issue with Shell transition, and will be deprecated soon.
|
// Legacy split is having some issue with Shell transition, and will be deprecated soon.
|
||||||
assumeFalse(isShellTransitionsEnabled())
|
assumeFalse(isShellTransitionsEnabled())
|
||||||
prevDevEnableNonResizableMultiWindow = getDevEnableNonResizableMultiWindow(context)
|
prevDevEnableNonResizableMultiWindow = getDevEnableNonResizableMultiWindow(context)
|
||||||
|
|||||||
Reference in New Issue
Block a user