Stores: cloud uploads on every exit path; downloads keep going in the background

Cloud saves no longer depend on the compat tool's exit hook alone,
which never runs when the session is closed from the drawer. The
pre-launch step marks the game dirty in the app's storage, and the
upload runs on the first of the exit request, the end of the session
(after teardown) or the app's next start for a mark a killed app left,
not while a session runs. The mark goes only after an upload went
through or a final skip; each logs its trigger. The planner test runs
under Robolectric for org.json.

Downloads keep going with the screen off: while one runs the service
holds a Wi-Fi lock (high-performance before Android 14, low-latency
from it) and a partial wake lock taken with a timeout and renewed with
the progress, both released as soon as nothing runs. The notification
has a real progress bar and the Downloads row's line (game, percent,
sizes, speed, time left; the stage while installing), Pause / Resume,
and a Cancel that first asks Delete / Keep for ten seconds. A paused
download leaves a notice to resume from; an installed game posts a
notice that opens it in Games, a failed one opens Downloads. On
Android 13 and later notifications are asked for once, the first time
an install starts from a screen.
This commit is contained in:
The412Banner committed 2026-10-09 06:36:29 -04:00
1 parent cc981aa69f
commit 6a175f1097
16 files changed
+375 -33

No files matched your search

+6
View File
@@ -154,6 +154,12 @@ the prefix's user folder appears, within a minute. Every path logs
to 15 s; for a store game with cloud saves it returns 10, and the compat tool then waits for
Proton instead of exec'ing it and runs `droiddeck-store-launch --exited` after, which asks for
`cloud-up` without waiting. Each sync logs `cloud <store> <id> down|up files= bytes= result=`.
- **Uploads that do not depend on one hook:** the pre-launch step marks the game dirty in the app's
storage; the upload runs on the first of the compat tool's exit request (`trigger=exit`), the
session's end (`trigger=session-end`, after teardown, reading the prefix directly) or the app's
next start for a mark a killed app left (`trigger=recovery`, not while a session runs). The mark
goes only after an upload that went through or a final skip (off, no cloud saves, no baseline,
not installed, nothing local).
- **Per game:** the store card in the Games tab's launch settings has "Cloud saves" (on), kept in the
sidecar (`"cloud"`) and read by both sides; Manage saves shows the last sync with Upload and
Download, or "No cloud saves".