Fix:Android cancel sleep timer resets volume #605

This commit is contained in:
advplyr 2023-02-25 09:28:22 -06:00
parent 83027a5787
commit 960f75bfba
2 changed files with 5 additions and 1 deletions

View file

@ -137,6 +137,8 @@ class SleepTimerManager constructor(private val playerNotificationService: Playe
sleepTimerRunning = false
isAutoSleepTimer = false
playerNotificationService.unregisterSensor()
setVolume(1f)
}
fun getSleepTimerTime():Long {

View file

@ -378,7 +378,9 @@ class AbsAudioPlayer : Plugin() {
@PluginMethod
fun cancelSleepTimer(call: PluginCall) {
playerNotificationService.sleepTimerManager.cancelSleepTimer()
Handler(Looper.getMainLooper()).post {
playerNotificationService.sleepTimerManager.cancelSleepTimer()
}
call.resolve()
}