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

Commit 2c98e18c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Null check! Now with a test"

parents f03b32a2 8e0eb372
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -684,12 +684,12 @@ public class RankingHelper implements RankingConfig {
        NotificationChannel channel = r.channels.get(channelId);
        if (channel != null) {
            channel.setDeleted(true);
        }
            LogMaker lm = getChannelLog(channel, pkg);
            lm.setType(MetricsProto.MetricsEvent.TYPE_CLOSE);
            MetricsLogger.action(lm);
            updateConfig();
        }
    }

    @Override
    @VisibleForTesting
+5 −0
Original line number Diff line number Diff line
@@ -726,6 +726,11 @@ public class RankingHelperTest {
        assertEquals(channel.canShowBadge(), savedChannel.canShowBadge());
    }

    @Test
    public void testDeleteNonExistentChannel() throws Exception {
        mHelper.deleteNotificationChannelGroup(PKG, UID, "does not exist");
    }

    @Test
    public void testGetDeletedChannel() throws Exception {
        NotificationChannel channel =