diff options
| author | 2024-10-24 20:22:05 +0000 | |
|---|---|---|
| committer | 2024-10-24 20:22:05 +0000 | |
| commit | f192273e55e8cfa55dc6625ffdf4b8cf7dec9c15 (patch) | |
| tree | 752793bf25f8dc74d93d365000d0b3407d1af5e1 | |
| parent | c4b3da5227818271ab1b4c73e7c2e6c6532ddb4b (diff) | |
[pm] reduce lock contention on createSession
mInstallerUid doesn't need to be locked and it has been changed to volatile since ag/14040815. Removing the synchronized block so that the creation of one session is not blocked by the validation of another.
Change-Id: Ife08af651656a81a59be0c1ffb2a30a84e390f8c
BUG: 319178414
FIXES: 319178414
Test: n/a
FLAG: EXEMPT bug fix
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageInstallerSession.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java index 512b19582237..6ea5369040fe 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerSession.java +++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java @@ -4445,9 +4445,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { * @return the uid of the owner this session */ public int getInstallerUid() { - synchronized (mLock) { - return mInstallerUid; - } + return mInstallerUid; } /** |