Fixes multiple activity snapshots can stay in cache.
1. Fix snaphsot isn't remove from cache because there didn't search the activity outside of transition. It's a regression from ag/23898517 2. Skip record activity snapshot if the persist queue is too deep. The StoreWriteQueueItem will hold a snapshot reference and waiting to write on disk in perisist queue, skip record the snapshot if there already have too many store items, since those will be purge anyway. Bug: 382014256 Flag: EXEMPT bugfix Test: atest ActivitySnapshotControllerTests Test: Launch activity continuously like stress test, monitor the activity snapshot won't increase repidly within a short of time, and there should always only one snapshot left in activity snapshot cache. Change-Id: I65b245713682bc7796eb132050bc5bcebb0972dd
Loading
Please register or sign in to comment