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

Commit 43221a63 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Change AndroidXAnimatorIsolationRule from @ClassRule to @Rule" into main

parents 215b0f66 783dd1f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@ class PlatformAnimatorIsolationRule : TestRule {
        private fun onError() =
        private fun onError() =
            exceptionDeferrer.fail(
            exceptionDeferrer.fail(
                "Test's animations are not isolated! " +
                "Test's animations are not isolated! " +
                    "Did you forget to add an AnimatorTestRule to your test class?"
                    "Did you forget to add an AnimatorTestRule as a @Rule?"
            )
            )


        fun throwDeferred() = exceptionDeferrer.throwDeferred()
        fun throwDeferred() = exceptionDeferrer.throwDeferred()
+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ class AndroidXAnimatorIsolationRule : TestRule {
        private fun onError() =
        private fun onError() =
            exceptionDeferrer.fail(
            exceptionDeferrer.fail(
                "Test's animations are not isolated! " +
                "Test's animations are not isolated! " +
                    "Did you forget to add an AnimatorTestRule to your test class?"
                    "Did you forget to add an AnimatorTestRule as a @Rule?"
            )
            )


        fun throwDeferred() = exceptionDeferrer.throwDeferred()
        fun throwDeferred() = exceptionDeferrer.throwDeferred()
+2 −3
Original line number Original line Diff line number Diff line
@@ -49,7 +49,6 @@ import com.android.systemui.statusbar.phone.SystemUIDialogManager;
import org.junit.After;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Rule;
import org.mockito.Mockito;
import org.mockito.Mockito;


@@ -69,8 +68,8 @@ public abstract class SysuiTestCase {
    private Handler mHandler;
    private Handler mHandler;


    // set the lowest order so it's the outermost rule
    // set the lowest order so it's the outermost rule
    @ClassRule(order = Integer.MIN_VALUE)
    @Rule(order = Integer.MIN_VALUE)
    public static AndroidXAnimatorIsolationRule mAndroidXAnimatorIsolationRule =
    public AndroidXAnimatorIsolationRule mAndroidXAnimatorIsolationRule =
            new AndroidXAnimatorIsolationRule();
            new AndroidXAnimatorIsolationRule();


    @Rule
    @Rule