diff options
Diffstat (limited to 'java/com/android/dialer/notification')
-rw-r--r-- | java/com/android/dialer/notification/NotificationChannelManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/com/android/dialer/notification/NotificationChannelManager.java b/java/com/android/dialer/notification/NotificationChannelManager.java index ef0f5f17a..599e5ca59 100644 --- a/java/com/android/dialer/notification/NotificationChannelManager.java +++ b/java/com/android/dialer/notification/NotificationChannelManager.java @@ -340,8 +340,10 @@ public class NotificationChannelManager { NotificationChannel channel = new NotificationChannel(channelId, name, importance); channel.setShowBadge(canShowBadge); if (sound != null) { + // silentRingtone acts as a sentinel value to indicate that setSound should still be called, + // but with a null value to indicate no sound. channel.setSound( - sound, + sound.equals(silentRingtone) ? null : sound, new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_NOTIFICATION).build()); } channel.enableLights(lights); |