Skip to content
Commit d066c7c9 authored by Hai Zhang's avatar Hai Zhang
Browse files

Move computePackageStateHash() implementation into platform.

The computePackageStateHash() implementation needs
PackageManagerInternal.forEachInstalledPackage(),
getApplicationEnabledState(), getEnabledComponents() and
getDisabledComponents() to work, for which we don't have good
alternatives in API. Even if we added those APIs, generating and
iterating over PackageInfo for all packages in the system would surely
drive up CPU and memory usage and regress our performance, and the new
AndroidPackage system APIs isn't ready in S yet. So we can move
computePackageStateHash() implementation into platform. Once we move
role logic into system server, granting default roles may be fast
enough and we may consider the deprecation/removal of this.

This way we can also remove the final dependency we have on
PackageManagerInternal and be ready for modularization.

Bug: 158736025
Test: presubmit
Change-Id: I14119f2e95c861ee3539108748a4912b051b4462
parent 91464139
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