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