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

Commit 66e7ff79 authored by Jerry Chang's avatar Jerry Chang
Browse files

Only run legacy split flicker tests when it is using legacy split

Ignore legacy split flicker tests if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.

Bug: 189245318
Test: pass existing tests
Change-Id: Ic3dfbe849e7fcc9f25e44b7ff37ad00fdee60e9a
parent 61414e03
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)