Skip to content
Commit 2a5f1edc authored by Winson Chiu's avatar Winson Chiu
Browse files

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
parent c5ae4b9e
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