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

Commit fc7ff7b7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only run legacy split flicker tests when it is using legacy split" into sc-v2-dev

parents 9b37146f 66e7ff79
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.wm.shell.flicker.helpers

import android.app.Instrumentation
import android.content.ComponentName
import android.content.res.Resources
import com.android.wm.shell.flicker.testapp.Components

class SplitScreenHelper(
@@ -30,6 +31,11 @@ class SplitScreenHelper(
        const val TEST_REPETITIONS = 1
        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 =
            SplitScreenHelper(instrumentation,
                Components.SplitScreenActivity.LABEL,
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.setDevEn
import com.android.wm.shell.flicker.helpers.SplitScreenHelper
import org.junit.After
import org.junit.Assume.assumeFalse
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Test

@@ -56,6 +57,8 @@ abstract class LegacySplitScreenTransition(protected val testSpec: FlickerTestPa

    @Before
    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.
        assumeFalse(isShellTransitionsEnabled())
        prevDevEnableNonResizableMultiWindow = getDevEnableNonResizableMultiWindow(context)