Pass Context to DexUseManagerLocal and notify it about boot complete.

Bug: 249984283
Test: Presubmit
Change-Id: Ib9c13f13dcbb100b1ee216974dcdcdd64b81ae8b
This commit is contained in:
Jiakai Zhang
2022-12-20 13:13:47 +00:00
parent 5248856cc3
commit e4ed9c5501
2 changed files with 6 additions and 1 deletions

View File

@@ -4270,6 +4270,11 @@ public class PackageManagerService implements PackageSender, TestUtilityService
// Prune unused static shared libraries which have been cached a period of time
schedulePruneUnusedStaticSharedLibraries(false /* delay */);
DexUseManagerLocal dexUseManager = DexOptHelper.getDexUseManagerLocal();
if (dexUseManager != null) {
dexUseManager.systemReady();
}
}
//TODO: b/111402650

View File

@@ -1250,7 +1250,7 @@ public final class SystemServer implements Dumpable {
// DexUseManagerLocal needs to be loaded after PackageManagerLocal has been registered, but
// before PackageManagerService starts processing binder calls to notifyDexLoad.
LocalManagerRegistry.addManager(
DexUseManagerLocal.class, DexUseManagerLocal.createInstance());
DexUseManagerLocal.class, DexUseManagerLocal.createInstance(mSystemContext));
t.traceEnd();
if (!mRuntimeRestart && !isFirstBootOrUpgrade()) {