Open up AndroidPackage as @SystemApi
Moves all the PackageInfo/ApplicationInfo values into core SDK side
interfaces which represent all the mirrored functionality.
Creates AndroidPackageApi, PackageState, and a new PackageUserState
interface that act as the actual exposed interfaces for consumers like
mainline.
To avoid taking the PackageManagerService lock, and to avoid mutability
issues, PackageSettings are shallowly copied into PackageState objects.
And class PackageUserState objects into interface PackageUserState.
Eventually PackageSetting/class PackageUserState should be migrated to
the corresponding interfaces.
Miscellaneous additional changes:
- Removes PackageSetting#uidError, was never used
- Removes PackageUserState#categoryHint, was a package level field
without per-user difference, use PackageSetting#categoryHint instead
- Add locking to class PackageUserState overlay paths so they can be
copied for the new interface.
Bug: 173455397
Test: atest com.android.server.pm.ScanTests
Change-Id: Ib98c66a9b4d78d09151724eaf14c16074c3621c9
63 files changed