Repository navigation
Go idle while a phone app is in the background - #35
Merged
Merged
Conversation
pause now closes the audio output, stops the live streams and holds the auto-refresh timer until resume. An open audio output holds the audio wakelock even when silent, and with the phone kept awake the streams and timer kept the radio and CPU busy for a screen nobody was looking at. resume reopens audio, reconnects the streams and refreshes the account's open timelines (the current one first; other accounts on the next auto-refresh). Push notifications cover new activity meanwhile. Android and iOS both send pause/resume already. On Android, a configuration change (folding or unfolding) is not treated as leaving the app, and the paused flag is per process so a window rebuilt while paused still resumes. Core syntax-checked with clang on macOS; Android compiles. Not built on Windows or run on iOS here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aaron-gh
marked this pull request as ready for review
November 11, 2026 10:55
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.
An open audio output holds the audio wakelock even when silent. With the phone
kept awake, the live streams and the auto-refresh timer kept the radio and CPU
busy for a screen nobody was looking at.
Core (
CoreSession):pausepublishes positions as before, then closes the audio output(
sound_.suspend()), stops every stream and setsbackgrounded_.update_streamingopens nothing and the auto-refresh loopskips its ticks.
resumereopens audio, reconnects streams and refreshes the current timeline,plus the account's other open timelines. Other accounts catch up on the next
auto-refresh. Push notifications cover new activity meanwhile.
Android:
app, so it no longer stops and restarts sounds and streams.
resume.iOS already sends
pause/resume; no iOS change. Windows, macOS and Linuxdon't send
pause, so they are unaffected.Testing: Android tested on a Galaxy Z Fold 7. iOS not tested. Core syntax-checked
with clang on macOS; not built on Windows, unit tests not run.