Merge "Conversations can't individually bypass dnd" into rvc-dev am: b3f2c0d528
am: 6d30804cec
Change-Id: Icdeaafe85fa03ed0ee03379bcb41995be18d46dd
This commit is contained in:
@@ -66,6 +66,7 @@ public class ConversationPromotePreferenceController extends NotificationPrefere
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
mChannel.setDemoted(false);
|
mChannel.setDemoted(false);
|
||||||
|
mChannel.setBypassDnd(false);
|
||||||
saveChannel();
|
saveChannel();
|
||||||
|
|
||||||
if (mHostFragment != null) {
|
if (mHostFragment != null) {
|
||||||
|
@@ -110,6 +110,7 @@ public class ConversationPromotePreferenceControllerTest {
|
|||||||
NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_DEFAULT);
|
NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_DEFAULT);
|
||||||
channel.setConversationId("a", "a");
|
channel.setConversationId("a", "a");
|
||||||
channel.setDemoted(true);
|
channel.setDemoted(true);
|
||||||
|
channel.setBypassDnd(true);
|
||||||
mController.onResume(appRow, channel, null, null, null, null);
|
mController.onResume(appRow, channel, null, null, null, null);
|
||||||
|
|
||||||
Preference pref = mock(Preference.class);
|
Preference pref = mock(Preference.class);
|
||||||
@@ -121,6 +122,7 @@ public class ConversationPromotePreferenceControllerTest {
|
|||||||
|
|
||||||
verify(mBackend).updateChannel(eq(null), anyInt(), captor.capture());
|
verify(mBackend).updateChannel(eq(null), anyInt(), captor.capture());
|
||||||
assertFalse(captor.getValue().isDemoted());
|
assertFalse(captor.getValue().isDemoted());
|
||||||
|
assertFalse(captor.getValue().canBypassDnd());
|
||||||
|
|
||||||
verify(mFragment).getActivity();
|
verify(mFragment).getActivity();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user