summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/notification/NotificationChannelManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/notification/NotificationChannelManager.java')
-rw-r--r--java/com/android/dialer/notification/NotificationChannelManager.java4
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);