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

Commit b1ec5751 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Fix hiding of channel fields" into qt-dev

am: c14825c9

Change-Id: If177a632404ae3af41c18c2c36b9b4e6ddb2a218
parents f692c8e5 c14825c9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -74,7 +74,9 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
            return false;
        }
        if (mChannelGroup != null) {
            return !mChannelGroup.isBlocked();
            if (mChannelGroup.isBlocked()) {
                return false;
            }
        }
        if (mChannel != null) {
            return mChannel.getImportance() != IMPORTANCE_NONE;
+3 −1
Original line number Diff line number Diff line
@@ -105,10 +105,12 @@ public class NotificationPreferenceControllerTest {
    @Test
    public void isAvailable_notIfChannelBlocked() {
        NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
        NotificationChannelGroup group = mock(NotificationChannelGroup.class);
        when(group.isBlocked()).thenReturn(false);
        NotificationChannel channel = mock(NotificationChannel.class);
        when(channel.getImportance()).thenReturn(IMPORTANCE_NONE);

        mController.onResume(appRow, channel, null, null);
        mController.onResume(appRow, channel, group, null);
        assertFalse(mController.isAvailable());
    }