Skip to content
Commit e74d7bf2 authored by wilsonshih's avatar wilsonshih
Browse files

Introduce ActivitySnapshotController(3/N)

The AppSnapshotController is response for transition analysis, so
TaskSnapshotController and ActivitySnapshotController does not need
to do duplicate analysis. Also, it should be easier to do test by
de-couple the "transition-analysiser" and "transition-handler".

And for the basic implementation of Activity snapshot controller:
1. Record and/or remove an activity snapshot when an activity
transition happen.
2. Delete and/or load an activity snapshot from disk to cache when a
task transition happen.
3. Only keep one snapshot for the visible task in the cache.
4. This feature is disabled on Low Ram device.
5. Persisted snapshot file will be removed when activity removed.
6. All persisted files for a user will be removed while first access.
7. Purge persisted files on disk when persited file exceed a maximum
count.
8. Works on multi-user environment.

Bug: 259497289
Test: atest TransitionTests ActivitySnapshotControllerTests\
AppSnapshotControllerTests TaskSnapshotControllerTest

Change-Id: I4fc0ca96c748c6123ffabcab9c6b03b7057ac840
parent 99e93940
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