use the Alarm stream for reminders so it is played properly in DND mode too

This commit is contained in:
tibbi 2018-05-26 22:58:03 +02:00
parent 37569ca309
commit 7a6b8ea8ad
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ class SettingsActivity : SimpleActivity() {
settings_reminder_sound.text = config.reminderSoundTitle
settings_reminder_sound_holder.setOnClickListener {
SelectAlarmSoundDialog(this, config.reminderSoundUri, AudioManager.STREAM_NOTIFICATION, GET_RINGTONE_URI, ALARM_SOUND_TYPE_NOTIFICATION, false,
SelectAlarmSoundDialog(this, config.reminderSoundUri, AudioManager.STREAM_ALARM, GET_RINGTONE_URI, ALARM_SOUND_TYPE_NOTIFICATION, false,
onAlarmPicked = {
if (it != null) {
updateReminderSound(it)

View File

@ -221,7 +221,7 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
.setPriority(Notification.PRIORITY_HIGH)
.setDefaults(Notification.DEFAULT_LIGHTS)
.setAutoCancel(true)
.setSound(Uri.parse(soundUri), AudioManager.STREAM_NOTIFICATION)
.setSound(Uri.parse(soundUri), AudioManager.STREAM_ALARM)
.setChannelId(channelId)
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(this, event))