diff --git a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java index 86522ed2a92..c2efd0d36f4 100644 --- a/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accounts/RemoveAccountPreferenceControllerTest.java @@ -65,6 +65,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; @@ -114,8 +115,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