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

Commit 5da6bcae authored by wilsonshih's avatar wilsonshih
Browse files

Initialize reference count for SnapshotTracker

Because there can be more than one onTaskSnapshotChanged listeners in
a process, initialize the reference count based on the listener size
for SnapshotTracker, to prevent one thread closing the snapshot while
others are still using it.
Also remove the extra close buffer request when
TaskStackChangeListeners#impl handle ON_TASK_SNAPSHOT_CHANGED,
ThumbnailData#fromSnapshot will do close buffer already.

Flag: com.android.window.flags.reduce_task_snapshot_memory_usage
Bug: 438037933
Test: monitor the same snapshot object will only request to close
buffer once from other tests after SystemUITests:NavigationBarTest

Change-Id: I31e94bf377b4dab998691ee962172dcee082b956
parent 38b97132
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment