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

Commit 5d664b97 authored by Luca Zuccarini's avatar Luca Zuccarini Committed by Android (Google) Code Review
Browse files

Merge "Exempt Auto targets from AnimatorTestRuleToolkitTest." into main

parents 740459fa 6ce048da
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.animation

import android.content.pm.PackageManager
import android.graphics.Color
import android.platform.test.annotations.MotionTest
import android.view.ViewGroup
@@ -23,11 +24,14 @@ import android.widget.FrameLayout
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
import com.android.internal.dynamicanimation.animation.DynamicAnimation
import com.android.internal.dynamicanimation.animation.SpringAnimation
import com.android.internal.dynamicanimation.animation.SpringForce
import kotlinx.coroutines.test.TestScope
import org.junit.Assume.assumeFalse
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -65,6 +69,16 @@ class AnimatorTestRuleToolkitTest {
            bitmapDiffer = screenshotRule,
        )

    @Before
    fun setUp() {
        // Do not run on Automotive.
        assumeFalse(
            InstrumentationRegistry.getInstrumentation().context.packageManager.hasSystemFeature(
                PackageManager.FEATURE_AUTOMOTIVE
            )
        )
    }

    @Test
    fun recordFilmstrip_withAnimator() {
        val animatedBox = createScene()
@@ -188,12 +202,7 @@ class AnimatorTestRuleToolkitTest {
                null
            }
        return motionRule.recordMotion(
            AnimatorRuleRecordingSpec(
                container,
                motionControl,
                sampleIntervalMs,
                visualCapture,
            ) {
            AnimatorRuleRecordingSpec(container, motionControl, sampleIntervalMs, visualCapture) {
                feature(ViewFeatureCaptures.alpha, "alpha")
            }
        )