Unblock users when sleep timer acts up (#8593)

### Description

Unblock users when sleep timer acts up. Release mode only, we want to
handle/fix this as a bug if it happens.

### Checklist
<!-- 
To help us keep the issue tracker clean and work as efficient as
possible,
  please make sure that you have done all of the following.
You can tick the boxes below by placing an x inside the brackets like
this: [x]
-->
- [x] I have read the contribution guidelines:
https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request
- [x] I have performed a self-review of my code, going through my
changes line by line and carefully considering why this line change is
necessary
- [x] I have run the automated code checks using `./gradlew checkstyle
lint`
- [x] My code follows the style guidelines of the AntennaPod project:
https://antennapod.org/contribute/develop/app/code-style
- [x] I have mentioned the corresponding issue and the relevant keyword
(e.g., "Closes: #xy") in the description (see
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
- [x] If it is a core feature, I have added automated tests
This commit is contained in:
Hans-Peter Lehmann
2026-07-11 22:00:51 +02:00
committed by GitHub
parent af577fef08
commit 42b0ef5e27

View File

@ -721,6 +721,9 @@ public class Media3PlaybackService extends MediaLibraryService {
if (sleepTimer != null) {
sleepTimer.stop();
sleepTimer = null;
} else if (!BuildConfig.DEBUG) {
// Unblock user in case we somehow got into an inconsistent state
EventBus.getDefault().postSticky(SleepTimerUpdatedEvent.cancelled());
}
if (player != null) {
applyVolumeAdaption(1.0f);