[Android] Migrate sleep timer from AlarmManager to a more reliable in-app implementation

Nicolas Pomepuy git at videolan.org
Tue Feb 15 12:00:51 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Feb 15 09:27:48 2022 +0100| [ea94a7ee34fe74da8125841a3b1dd20baac4e2cf] | committer: Nicolas Pomepuy

Migrate sleep timer from AlarmManager to a more reliable in-app implementation

Fixes #2360
As AlarmManager is not reliable on all API versions/OEM implementations
we want to get rid of itfor the sleep timer management and instead use
a custom implementation based on coroutine job.

> https://code.videolan.org/videolan/vlc-android/commit/ea94a7ee34fe74da8125841a3b1dd20baac4e2cf
---

 .../main/java/org/videolan/resources/Constants.kt  |  1 -
 .../ui/audioplayer/AudioPlayerActivity.kt          |  6 +--
 .../src/org/videolan/vlc/PlaybackService.kt        | 51 +++++++++++++++++-----
 .../src/org/videolan/vlc/gui/audio/AudioPlayer.kt  |  8 ++--
 .../videolan/vlc/gui/dialogs/SleepTimerDialog.kt   | 12 ++---
 .../vlc/gui/helpers/PlayerOptionsDelegate.kt       | 28 +++---------
 .../vlc/gui/video/VideoPlayerOverlayDelegate.kt    |  6 +--
 .../src/org/videolan/vlc/media/PlaylistManager.kt  |  1 +
 8 files changed, 63 insertions(+), 50 deletions(-)

Diff:   https://code.videolan.org/videolan/vlc-android/commit/ea94a7ee34fe74da8125841a3b1dd20baac4e2cf


More information about the Android mailing list