Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3d7dc6d0 authored by Tyler Lacey's avatar Tyler Lacey
Browse files

Allow Game Service to trigger the Game Session creation

With this change, the GameServiceProviderInstanceImpl no longer
automatically creates a game session every time a new game task is
started. Instead, the GameServiceProviderInstanceImpl calls the new
GameService#onGameStarted method with details about the game task that
just started.

The GameService can implement onGameStarted with appropriate logic to
determine whether a game session should be created. If the service
determines that a session should be created, then the GameService can
call GameService#createGameSession.

After calling onGameStarted, the GameServiceProviderInstanceImpl will
maintain a GameSessionRecord in the NO_GAME_SESSION_REQUESTED state.
Only games with a record in this state will have a session created in
response to createGameSession being called. When createGameSession
is called for a record in this state, the record will transition to the
GAME_SESSION_REQUESTED state. Once the game session is finally created
and attached to the record, it will switch to the GAME_SESSION_ATTACHED
state.

Test: Manual e2e testing and unit tests
Bug: 207035150
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: I799f8410da6936ab242fa925d77b0276875cc20f

Change-Id: Id6da59fd3a5951ba5f032c825d1f1f28d3320965
parent 71abd123
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment