Fix background play notification volume adjustment#13284
Fix background play notification volume adjustment#13284utafrali 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>
|
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! |
|
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. |
|
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. |
|
Got it, thanks for the update. |
|
Sorry not very experienced with github. Has this been pushed to the main branch yet? or is there an update for this specific fix |
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