Loading services/core/java/com/android/server/notification/RankingHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading services/tests/notification/src/com/android/server/notification/RankingHelperTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -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 = Loading Loading
services/core/java/com/android/server/notification/RankingHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading
services/tests/notification/src/com/android/server/notification/RankingHelperTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -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 = Loading