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

Commit 23e7f069 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Only run legacy split flicker tests when it is using legacy split" into...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15619156

Change-Id: Idded1256db5ec228703e9fe65442f2e002ebfe95
parents 13e91cd6 ccb4eb05
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)