Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56d0f6b0 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Conversations can't individually bypass dnd

Test: atest
Fixes: 152482973
Change-Id: I19432b79724beca46974c1c88d42a231f0703dc7
parent cfb1f986
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ public class ConversationPromotePreferenceController extends NotificationPrefere
            return false;
        }
        mChannel.setDemoted(false);
        mChannel.setBypassDnd(false);
        saveChannel();

        if (mHostFragment != null) {
+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ public class ConversationPromotePreferenceControllerTest {
        NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_DEFAULT);
        channel.setConversationId("a", "a");
        channel.setDemoted(true);
        channel.setBypassDnd(true);
        mController.onResume(appRow, channel, null, null, null, null);

        Preference pref = mock(Preference.class);
@@ -121,6 +122,7 @@ public class ConversationPromotePreferenceControllerTest {

        verify(mBackend).updateChannel(eq(null), anyInt(), captor.capture());
        assertFalse(captor.getValue().isDemoted());
        assertFalse(captor.getValue().canBypassDnd());

        verify(mFragment).getActivity();
    }