Clean up some AnimatorTestRule usages
Bug: 291645410 Test: atest SystemUITests Change-Id: I76bdcfce2ec02315b26ac26fa4a9434896fa6d28
This commit is contained in:
@@ -81,7 +81,7 @@ import com.android.systemui.util.settings.SecureSettings;
|
||||
import com.android.systemui.util.time.FakeSystemClock;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -136,8 +136,8 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
|
||||
private StatusBarWindowStateController mStatusBarWindowStateController;
|
||||
@Mock
|
||||
private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
|
||||
@ClassRule
|
||||
public static AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule();
|
||||
@Rule
|
||||
public final AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule();
|
||||
|
||||
private List<StatusBarWindowStateListener> mStatusBarWindowStateListeners = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ import com.android.systemui.statusbar.phone.LightBarController;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
@@ -111,8 +111,8 @@ public class RemoteInputViewTest extends SysuiTestCase {
|
||||
private BlockingQueueIntentReceiver mReceiver;
|
||||
private final UiEventLoggerFake mUiEventLoggerFake = new UiEventLoggerFake();
|
||||
|
||||
@ClassRule
|
||||
public static AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule();
|
||||
@Rule
|
||||
public final AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule();
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
||||
@@ -38,7 +38,6 @@ import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.animation.AnimatorTestRule;
|
||||
import android.app.KeyguardManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.AudioManager;
|
||||
@@ -85,8 +84,6 @@ import java.util.function.Predicate;
|
||||
@RunWith(AndroidTestingRunner.class)
|
||||
@TestableLooper.RunWithLooper
|
||||
public class VolumeDialogImplTest extends SysuiTestCase {
|
||||
private static final AnimatorTestRule sAnimatorTestRule = new AnimatorTestRule();
|
||||
|
||||
VolumeDialogImpl mDialog;
|
||||
View mActiveRinger;
|
||||
View mDrawerContainer;
|
||||
@@ -727,7 +724,6 @@ public class VolumeDialogImplTest extends SysuiTestCase {
|
||||
public void teardown() {
|
||||
cleanUp(mDialog);
|
||||
setOrientation(mOriginalOrientation);
|
||||
sAnimatorTestRule.advanceTimeBy(mLongestHideShowAnimationDuration);
|
||||
mTestableLooper.moveTimeForward(mLongestHideShowAnimationDuration);
|
||||
mTestableLooper.processAllMessages();
|
||||
reset(mPostureController);
|
||||
|
||||
@@ -49,7 +49,7 @@ import java.util.function.Consumer;
|
||||
* public class SampleAnimatorTest {
|
||||
*
|
||||
* {@literal @}Rule
|
||||
* public AnimatorTestRule sAnimatorTestRule = new AnimatorTestRule();
|
||||
* public final AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule();
|
||||
*
|
||||
* {@literal @}UiThreadTest
|
||||
* {@literal @}Test
|
||||
@@ -58,7 +58,7 @@ import java.util.function.Consumer;
|
||||
* animator.setDuration(1000L);
|
||||
* assertThat(animator.getAnimatedValue(), is(0));
|
||||
* animator.start();
|
||||
* sAnimatorTestRule.advanceTimeBy(500L);
|
||||
* mAnimatorTestRule.advanceTimeBy(500L);
|
||||
* assertThat(animator.getAnimatedValue(), is(500));
|
||||
* }
|
||||
* }
|
||||
|
||||
Reference in New Issue
Block a user