Skip to content

Asset Modules: Introduce session manager with one id per download request - #3757

Open
EDWARD-012 wants to merge 1 commit into
microg:masterfrom
EDWARD-012:asset-modules-session-manager
Open

Asset Modules: Introduce session manager with one id per download request#3757
EDWARD-012 wants to merge 1 commit into
microg:masterfrom
EDWARD-012:asset-modules-session-manager

Conversation

@EDWARD-012

Copy link
Copy Markdown

Summary

Implements a Play-like asset module session manager for #2675 (follow-up to #2506).

Each startDownload allocates one ever-increasing global session id that covers all requested modules. Replaces per-module base + moduleIndex assignment. requestDownloadInfo does not allocate sessions.

Changes

  • Add AssetModuleSessionManager (SharedPreferences AssetModuleSessionIdGenerator / Latest)
  • Bind all modules in a request to one sessionId (keep sessionIds map with identical values)
  • Fix onStartDownload to pass the real session id; pack-scoped session_id is never status
  • getSessionStates returns one bundle per session
  • On rebind, rename existing module dirs into the new session path when present

Out of scope

Test plan

  • :vending-app:assembleDefaultDebug / lintDefaultDebug
  • Single-module game still downloads (e.g. mkx / gameloft / pesam)
  • Multi-module fetch shares one session_id
  • Repeat startDownload gets a new session id
  • requestDownloadInfo does not mint a new session

Fixes #2675

…uest

Each startDownload allocates one ever-increasing global session id that
covers all requested modules, matching Play-like PAD session semantics
for microg#2675.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce asset module session manager

1 participant