Fix background play notification volume adjustment#13284
Open
utafrali wants to merge 1 commit intoTeamNewPipe:devfrom
Open
Fix background play notification volume adjustment#13284utafrali wants to merge 1 commit intoTeamNewPipe:devfrom
utafrali wants to merge 1 commit intoTeamNewPipe:devfrom
Conversation
Replace the ValueAnimator-based animateAudio() call in onAudioFocusGain() with a direct player.setVolume(1.0f). The ValueAnimator relies on the Choreographer/main thread rendering loop, which is throttled or suspended when the app is backgrounded (especially with battery optimizations on Android 12+). This left the volume stuck at 0.2f until the user foregrounded the app. Also remove setWillPauseWhenDucked(true) since the app ducks volume rather than pausing, aligning the declared intent with actual behavior so the system reliably delivers AUDIOFOCUS_GAIN on newer Android versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing this PR as it has been open for 1d 18h without maintainer feedback. If the fix is still needed, I'd be happy to reopen or submit an updated version. Thank you for your time! |
Contributor
|
hello and thank you for the PR. Please be patient. This is a not-for-profit open source project which is mostly maintained by volunteers. There are currently 43 open PRs in this repository alone. You'll get a review together with #13169 because both PRs are somehow related. |
Author
|
Sorry about closing this prematurely — I should've been more patient. Reopening so it can be reviewed alongside #13169 as you mentioned. No rush at all. |
Author
|
Got it, thanks for the update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is it?
Description of the changes in your PR
Removed the animated volume ducking behavior from audio focus handling. The -based approach was causing issues with volume adjustment in background playback notifications. Replaced the complex animation logic with direct volume control, which is more reliable and predictable.
Changes:
This simplification eliminates the timing issues that were affecting notification volume adjustment during background playback.
Fixes the following issue(s)
Due diligence