add the Ring stream to the available sound streams

This commit is contained in:
tibbi 2018-07-04 21:20:00 +02:00
parent d8fa3efdcb
commit 1aef62cdc4
1 changed files with 4 additions and 2 deletions

View File

@ -322,7 +322,8 @@ class SettingsActivity : SimpleActivity() {
val items = arrayListOf( val items = arrayListOf(
RadioItem(AudioManager.STREAM_ALARM, res.getString(R.string.alarm_stream)), RadioItem(AudioManager.STREAM_ALARM, res.getString(R.string.alarm_stream)),
RadioItem(AudioManager.STREAM_SYSTEM, res.getString(R.string.system_stream)), RadioItem(AudioManager.STREAM_SYSTEM, res.getString(R.string.system_stream)),
RadioItem(AudioManager.STREAM_NOTIFICATION, res.getString(R.string.notification_stream))) RadioItem(AudioManager.STREAM_NOTIFICATION, res.getString(R.string.notification_stream)),
RadioItem(AudioManager.STREAM_RING, res.getString(R.string.ring_stream)))
RadioGroupDialog(this@SettingsActivity, items, config.reminderAudioStream) { RadioGroupDialog(this@SettingsActivity, items, config.reminderAudioStream) {
config.reminderAudioStream = it as Int config.reminderAudioStream = it as Int
@ -334,7 +335,8 @@ class SettingsActivity : SimpleActivity() {
private fun getAudioStreamText() = getString(when (config.reminderAudioStream) { private fun getAudioStreamText() = getString(when (config.reminderAudioStream) {
AudioManager.STREAM_ALARM -> R.string.alarm_stream AudioManager.STREAM_ALARM -> R.string.alarm_stream
AudioManager.STREAM_SYSTEM -> R.string.system_stream AudioManager.STREAM_SYSTEM -> R.string.system_stream
else -> R.string.notification_stream AudioManager.STREAM_NOTIFICATION -> R.string.notification_stream
else -> R.string.ring_stream
}) })
private fun setupVibrate() { private fun setupVibrate() {