Make Settings robotest work with tot Robolectric
Bug: 116278591 Test: make -j RunSettingsRoboTests Change-Id: I32cb2fcf6094675f79d2fc24702ef6298a9691e4
This commit is contained in:
@@ -79,13 +79,13 @@ public class ZenModeMessagesPreferenceControllerTest {
|
||||
ShadowApplication shadowApplication = ShadowApplication.getInstance();
|
||||
shadowApplication.setSystemService(Context.NOTIFICATION_SERVICE, mNotificationManager);
|
||||
|
||||
mContext = shadowApplication.getApplicationContext();
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mValues = mContext.getResources().getStringArray(R.array.zen_mode_contacts_values);
|
||||
mContentResolver = RuntimeEnvironment.application.getContentResolver();
|
||||
when(mNotificationManager.getNotificationPolicy()).thenReturn(mPolicy);
|
||||
|
||||
when(mBackend.getPriorityMessageSenders())
|
||||
.thenReturn(NotificationManager.Policy.PRIORITY_SENDERS_STARRED);
|
||||
.thenReturn(NotificationManager.Policy.PRIORITY_SENDERS_STARRED);
|
||||
when(mBackend.getContactsSummary(ZenModeBackend.SOURCE_NONE))
|
||||
.thenCallRealMethod();
|
||||
when(mBackend.getContactsSummary(NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES))
|
||||
|
Reference in New Issue
Block a user