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

Commit 8d3520ea 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: Iac8ac8a6322872a3d77738b95a465ec39e144cab
parents b9e435f9 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());
    }