Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b013a475 authored by Winson's avatar Winson
Browse files

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