Repository navigation
Reopen the sample player after a memory kill, and test real websites - #48
Merged
Merged
Conversation
The soak runs on a 930 MB TV showed the system killing both of the sample app's processes, and the watchdog's attempt to reopen the player being blocked as a background activity start. The watchdog also came back with no launch extras, so the player would return on the default playlist. The sample app now declares SYSTEM_ALERT_WINDOW, which lets the watchdog reopen the player once granted, and returns START_REDELIVER_INTENT so the extras survive. The soak script grants it, checks that the player is on screen rather than that its process exists, records the WebView renderer's memory across all its processes, and takes SOAK_PLAYLIST. The report counts only the app's own crashes and splits low-memory kills between the player and the main process. Adds a websites playlist of 16 live sites with videos between them.
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.
A website soak run on the TV (930 MB RAM) ran it out of swap within 20 minutes. lmkd killed the sample app's main process and then the player, Android restarted the watchdog, and its attempt to reopen
PlayerActivitywas blocked as a background activity start. The TV sat on its home screen while the soak script saw a:playerprocess (restarted for its service) and didn't relaunch.Sample app:
SYSTEM_ALERT_WINDOW. Once granted (adb shell appops set io.github.gapless.sample SYSTEM_ALERT_WINDOW allow), Android lets the watchdog reopen the player from the background. Without it, the watchdog logs how to grant it.WatchdogServicereturnsSTART_REDELIVER_INTENTinstead ofSTART_STICKY, so a restarted watchdog still has the launch extras and the player comes back on the same playlist.Killing both processes by hand on the TV, the player was back on screen with the same playlist about 20 seconds later. Android still delays the watchdog's restart by minutes after repeated kills, and the main process ranks below the player when memory runs out, so the README now says to make the player the home app on devices that run out of memory often.
Soak script and report:
PlayerActivityisn't on screen for two samples, instead of when the:playerprocess is missing, and records that ason_screen.SOAK_PLAYLIST, keepsWebStateMachinewarnings, and grants the overlay permission at the start.Test media: a
websitesplaylist of 16 live sites (news with ads and consent banners, WebGL, maps, a dashboard, an embedded YouTube video, light pages) with a video or image between them, andwebsites_only.