destroy mediaplayer at ReminderActivity at onDestroy, not onStop

This commit is contained in:
tibbi 2018-07-07 23:54:05 +02:00
parent d69ed5543c
commit cf05ba6565

View File

@ -16,7 +16,7 @@ import com.simplemobiletools.commons.helpers.MINUTE_SECONDS
import kotlinx.android.synthetic.main.activity_reminder.* import kotlinx.android.synthetic.main.activity_reminder.*
class ReminderActivity : SimpleActivity() { class ReminderActivity : SimpleActivity() {
private val INCREASE_VOLUME_DELAY = 1000L private val INCREASE_VOLUME_DELAY = 3000L
private val increaseVolumeHandler = Handler() private val increaseVolumeHandler = Handler()
private val maxReminderDurationHandler = Handler() private val maxReminderDurationHandler = Handler()
@ -97,8 +97,8 @@ class ReminderActivity : SimpleActivity() {
finish() finish()
} }
override fun onStop() { override fun onDestroy() {
super.onStop() super.onDestroy()
increaseVolumeHandler.removeCallbacksAndMessages(null) increaseVolumeHandler.removeCallbacksAndMessages(null)
maxReminderDurationHandler.removeCallbacksAndMessages(null) maxReminderDurationHandler.removeCallbacksAndMessages(null)
destroyPlayer() destroyPlayer()