diff options
| author | Winson Chiu <chiuwinson@google.com> | 2022-05-12 15:43:51 +0000 |
|---|---|---|
| committer | Winson Chiu <chiuwinson@google.com> | 2022-05-12 17:30:10 +0000 |
| commit | 2a5f1edc4165ace418dd71c01ce978fe9c7283d3 (patch) | |
| tree | fbfbd2cee2d0bbceb0d1d61e3dd81c1c3636fe0b /core/java/android/util/SparseSetArray.java | |
| parent | c5ae4b9e4d00fc5f8fca1bd0e95a26f5033a65c8 (diff) | |
Fix PMS recordInitialState on retry
Need to recapture the initial state so that the retry on the
implementation lambda works as expected. Otherwise it will compare
a stale, always broken state on the retry.
Also adds a safety check in the commitStateMutation method to see
if the calling thread already has mLock. If it does, the state change
check can be skipped since no snapshot changes can come in while the
lock is held.
Bug: 232061163
Test: atest android.packageinstaller.install.cts.SessionTest#setAppCategory
Change-Id: I78cd6a32782ee64a705ba5faa6a72a7bf8a95f03
Diffstat (limited to 'core/java/android/util/SparseSetArray.java')
0 files changed, 0 insertions, 0 deletions
