mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-03-25 07:50:30 +01:00
do not show exceptions thrown at reminder screen
This commit is contained in:
parent
41ad3be223
commit
cbda18faac
@ -168,7 +168,12 @@ class ReminderActivity : SimpleActivity() {
|
||||
vibrator?.vibrate(VibrationEffect.createWaveform(pattern, 0))
|
||||
}
|
||||
|
||||
val soundUri = if (alarm != null) alarm!!.soundUri else config.timerSoundUri
|
||||
val soundUri = if (alarm != null) {
|
||||
alarm!!.soundUri
|
||||
} else {
|
||||
config.timerSoundUri
|
||||
}
|
||||
|
||||
if (soundUri != SILENT) {
|
||||
try {
|
||||
mediaPlayer = MediaPlayer().apply {
|
||||
@ -179,12 +184,11 @@ class ReminderActivity : SimpleActivity() {
|
||||
prepare()
|
||||
start()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
|
||||
if (config.increaseVolumeGradually) {
|
||||
scheduleVolumeIncrease()
|
||||
if (config.increaseVolumeGradually) {
|
||||
scheduleVolumeIncrease()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ class EditTimerDialog(val activity: SimpleActivity, val timer: Timer, val callba
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
edit_timer_label_image.applyColorFilter(textColor)
|
||||
edit_timer_label.setText(timer.label)
|
||||
|
||||
@ -111,5 +110,4 @@ class EditTimerDialog(val activity: SimpleActivity, val timer: Timer, val callba
|
||||
timer.channelId = null
|
||||
view.edit_timer_sound.text = alarmSound.title
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -81,5 +81,4 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
var timerChannelId: String?
|
||||
get() = prefs.getString(TIMER_CHANNEL_ID, null)
|
||||
set(id) = prefs.edit().putString(TIMER_CHANNEL_ID, id).apply()
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user