mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
docs(napplet): the 30 s background pause is an upper bound on Android 14+
The cached-app freezer suspends `:napplet` and its renderers about 10 s after the app leaves the screen (12 s measured on an API 36 emulator), so media and scripts stop well before BACKGROUND_PAUSE_MS. Say so where the constant is defined, instead of promising 30 s of playback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
38526fe810
commit
ccf1c1c75f
+6
@@ -32,6 +32,12 @@ object NappletHostContract {
|
||||
* disconnect 30 s after the UI stops (RelayProxyClientConnector's `WhileSubscribed(30000)`), so a quick
|
||||
* trip to another app (a 2FA code, a password manager) doesn't interrupt a page, while one left behind
|
||||
* stops running. Requests that act for the user are held from the first moment regardless.
|
||||
*
|
||||
* An upper bound, not a promise: on Android 14+ the cached-app freezer suspends `:napplet` (and its
|
||||
* renderers) about 10 s after the app leaves the screen, since nothing keeps that process in the
|
||||
* foreground. Measured on an API 36 emulator: frozen 12 s after Home, media stopped with it. So on those
|
||||
* devices a page stops within seconds, and this pause lands (on the next unfreeze) on a page that
|
||||
* already stopped.
|
||||
*/
|
||||
const val BACKGROUND_PAUSE_MS = 30_000L
|
||||
|
||||
|
||||
Reference in New Issue
Block a user