Fix invalid `equals` in NotificationChannels.channelExists

`DEFAULT_CHANNEL_ID` is a String, but `channel` is a NotificationChannel. Equals will therefore always return `false`. I think my fix (using `getId()`) is what was intended.
pull/1/head
Bas van Schaik 6 years ago committed by Greyson Parrelli
parent d482c60a98
commit ba67796992

@ -517,7 +517,7 @@ public class NotificationChannels {
@TargetApi(26)
private static boolean channelExists(@Nullable NotificationChannel channel) {
return channel != null && !NotificationChannel.DEFAULT_CHANNEL_ID.equals(channel);
return channel != null && !NotificationChannel.DEFAULT_CHANNEL_ID.equals(channel.getId());
}
private interface ChannelUpdater {

Loading…
Cancel
Save