summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetsProvider.cpp
diff options
context:
space:
mode:
author David Samuelson <samuelsond@google.com> 2022-04-22 19:29:12 +0000
committer David Samuelson <samuelsond@google.com> 2022-04-29 04:27:59 +0000
commitbc7b86dc2c871e412bd3dec7e670434075de84a5 (patch)
tree9fb6559bd3c143611b1ab753650e9cf1723e57b1 /libs/androidfw/AssetsProvider.cpp
parentf71832b46bcae438cc5c7379fcfc1094392b729e (diff)
Ensure GameSession is not destroyed when restarting game.
Previously when restarting the game via `GameSession.restartGame()` the assocaited GameSession would be destroyed, and then quickly recreated as the game's task was reported as removed and created (via TaskStackListener). In addition, any Activities that were in the task stack of the game where not removed, leading to the newly launched game's Activity to be placed above them in the task stack. This could led to lead to strange behavior, as it is expected that the game's Activity to be the lowest in the task stack. For example, closing the game's Activity would not close the task as the user would expect, instead revealing the previously launched Activites below it. To fix this issue, when restarting the game via `GameSession.restartGame` the game's task stack is no longer changed. Instead the game's Activity (and process) is restarted. As an added benifit this solution also gives the game an opportunity to save their instance state. Test: Manually verified Bug: 228842686 Bug: 202414447 Bug: 202417255 Change-Id: Iaf66de05ad6198f4f4ba4f526c171b83fcba234a
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions