mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-28 22:27:14 +02:00
Fix:Android cancel sleep timer resets volume #605
This commit is contained in:
@@ -137,6 +137,8 @@ class SleepTimerManager constructor(private val playerNotificationService: Playe
|
|||||||
sleepTimerRunning = false
|
sleepTimerRunning = false
|
||||||
isAutoSleepTimer = false
|
isAutoSleepTimer = false
|
||||||
playerNotificationService.unregisterSensor()
|
playerNotificationService.unregisterSensor()
|
||||||
|
|
||||||
|
setVolume(1f)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSleepTimerTime():Long {
|
fun getSleepTimerTime():Long {
|
||||||
|
|||||||
@@ -378,7 +378,9 @@ class AbsAudioPlayer : Plugin() {
|
|||||||
|
|
||||||
@PluginMethod
|
@PluginMethod
|
||||||
fun cancelSleepTimer(call: PluginCall) {
|
fun cancelSleepTimer(call: PluginCall) {
|
||||||
playerNotificationService.sleepTimerManager.cancelSleepTimer()
|
Handler(Looper.getMainLooper()).post {
|
||||||
|
playerNotificationService.sleepTimerManager.cancelSleepTimer()
|
||||||
|
}
|
||||||
call.resolve()
|
call.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user