diff --git a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java index d98d30aff6b..5e18c7c06a6 100644 --- a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java @@ -64,6 +64,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; @@ -113,8 +114,8 @@ public class RemoveAccountPreferenceControllerTest { when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())) .thenReturn(new AuthenticatorDescription[0]); when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); - mController = new RemoveAccountPreferenceController(RuntimeEnvironment.application, - mFragment); + mController = new RemoveAccountPreferenceController( + Robolectric.setupActivity(Activity.class), mFragment); } @After