Skip to content
Commit 13794383 authored by Lee Shombert's avatar Lee Shombert
Browse files

Correct locking in PackageManagerService

Bug: 194206793

PackageManagerService.mPackages was used as a lock exactly once.  This
meant there were two locks guarding LegacyPermissionState (and
possibly other state, as well): mLock and mPackages.  This change
replaces mPackages with mLock as the guard.

Two formatting errors were fixed.

An instrumented image was used to find other paths that might change
LegacyPermissionState outside of mLock; no such paths were found after
this fix.

Test: atest
 * android.car.apitest.CarUserManagerTest (requires cf_x86_auto-userdebug)
 * CtsContentTestCases:IntentFilterTest
 * CtsDynamicMimeHostTestCases
 * CtsRoleTestCases
 * FrameworksServicesTests:UserSystemPackageInstallerTest
 * FrameworksServicesTests:PackageManagerSettingsTests
 * FrameworksServicesTests:PackageManagerServiceTest
 * FrameworksServicesTests:AppsFilterTest
 * FrameworksServicesTests:PackageInstallerSessionTest
 * FrameworksServicesTests:ScanTests
 * UserLifecycleTests#startUser
 * UserLifecycleTests#stopUser
 * UserLifecycleTests#switchUser
 * FrameworksServicesTests:WatcherTest
 * android.appsecurity.cts.EphemeralTest
 * android.appsecurity.cts.InstantAppUserTest
Change-Id: If2914258c0a020fac124142cb292bafcee5e8a2a
parent ef12967b
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