Repository navigation
fix(app): keep caches and connections when leaving the app - #2317
Merged
Merged
Conversation
fix(pip): resize the video window seamlessly
fix(shorts): enter picture-in-picture with the system animation
feat(pip): Replay and Retry buttons, kept left to right in every language
perf(ambient): pause frame capture in picture-in-picture
perf(player): let ExoPlayer own the wake and Wi-Fi locks
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.
Summary
TRIM_MEMORY_BACKGROUNDand above. Android 14+ sendsTRIM_MEMORY_UI_HIDDENon every app exit, and the old>= RUNNING_LOWcheck emptied Coil's memory cache, the playlist caches and every idle OkHttp connection each time.AndroidSystemCallbacksalready halves it at RUNNING_LOW and clears it at BACKGROUND.AppMemoryTrimholds the level rule, with unit tests.Related issue
None.
Change type
Validation
Run on the top of the stack (
fix/pip-seamless-resize), which contains this change:./gradlew :app:assembleGithubDebug: passed./gradlew :app:testGithubDebugUnitTest: 7,046 tests, 0 failures, 46 skippedspotlessCheck,:app:compileGithubDebugKotlin,:app:compileFossDebugKotlinall passedTest device and Android version: Not run on a device (pure policy change, covered by unit tests)
Screenshots or recordings
Risk and compatibility
Memory: caches now survive leaving the app. Under real pressure Coil still trims itself, and
onLowMemoryand BACKGROUND still release the playlist caches and idle connections.Network: background audio keeps its connection to googlevideo between segments instead of reconnecting after each app exit.
The change does not introduce secrets, private data, or unexpected telemetry.
New user-facing text uses Android string resources.
Dependency and lockfile changes are intentional and limited to this PR.
Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
Breaking changes and upgrade steps are clearly documented.