[pm] correctly lock/unlock mInstallLock
ReentrantLock.lock() doesn't lock on the same thing as synchronized() locking. Since we use lock(mInstallLock) for b/306917971, we need to update all usages of synchronized(mInstallLock) to lock(mInstallLock). BUG: 341332694 Test: manually going through repro steps in the bug Test: atest FrameworksMockingServicesTests:com.android.server.pm.PackageManagerTracedLockTest Change-Id: I03d47a6ecbd0099d4c4130d1e3b070b55bfdcecb
Showing
- services/core/java/com/android/server/pm/AppDataHelper.java 4 additions, 4 deletionsservices/core/java/com/android/server/pm/AppDataHelper.java
- services/core/java/com/android/server/pm/DeletePackageHelper.java 4 additions, 4 deletions.../core/java/com/android/server/pm/DeletePackageHelper.java
- services/core/java/com/android/server/pm/FreeStorageHelper.java 23 additions, 31 deletions...es/core/java/com/android/server/pm/FreeStorageHelper.java
- services/core/java/com/android/server/pm/InstallPackageHelper.java 20 additions, 28 deletions...core/java/com/android/server/pm/InstallPackageHelper.java
- services/core/java/com/android/server/pm/InstallingSession.java 10 additions, 12 deletions...es/core/java/com/android/server/pm/InstallingSession.java
- services/core/java/com/android/server/pm/MovePackageHelper.java 1 addition, 1 deletion...es/core/java/com/android/server/pm/MovePackageHelper.java
- services/core/java/com/android/server/pm/OtaDexoptService.java 2 additions, 2 deletions...ces/core/java/com/android/server/pm/OtaDexoptService.java
- services/core/java/com/android/server/pm/PackageDexOptimizer.java 7 additions, 7 deletions.../core/java/com/android/server/pm/PackageDexOptimizer.java
- services/core/java/com/android/server/pm/PackageManagerService.java 22 additions, 26 deletions...ore/java/com/android/server/pm/PackageManagerService.java
- services/core/java/com/android/server/pm/PackageManagerTracedLock.java 59 additions, 13 deletions.../java/com/android/server/pm/PackageManagerTracedLock.java
- services/core/java/com/android/server/pm/RemovePackageHelper.java 5 additions, 5 deletions.../core/java/com/android/server/pm/RemovePackageHelper.java
- services/core/java/com/android/server/pm/SharedLibrariesImpl.java 1 addition, 1 deletion.../core/java/com/android/server/pm/SharedLibrariesImpl.java
- services/core/java/com/android/server/pm/StorageEventHelper.java 3 additions, 3 deletions...s/core/java/com/android/server/pm/StorageEventHelper.java
- services/core/java/com/android/server/pm/UserDataPreparer.java 3 additions, 3 deletions...ces/core/java/com/android/server/pm/UserDataPreparer.java
- services/core/java/com/android/server/pm/dex/DexManager.java 5 additions, 12 deletionsservices/core/java/com/android/server/pm/dex/DexManager.java
- services/tests/mockingservicestests/src/com/android/server/pm/PackageManagerTracedLockTest.java 135 additions, 0 deletions...c/com/android/server/pm/PackageManagerTracedLockTest.java
- services/tests/mockingservicestests/src/com/android/server/pm/dex/DexManagerTests.java 2 additions, 4 deletions...stests/src/com/android/server/pm/dex/DexManagerTests.java
Loading
Please register or sign in to comment