Merge "DO NOT MERGE - Merge RQ3A.210605.005" into stage-aosp-master

This commit is contained in:
TreeHugger Robot
2021-06-18 11:38:15 +00:00
committed by Android (Google) Code Review

View File

@@ -782,12 +782,15 @@ public abstract class ApexManager {
void registerApkInApex(AndroidPackage pkg) { void registerApkInApex(AndroidPackage pkg) {
synchronized (mLock) { synchronized (mLock) {
for (ActiveApexInfo aai : mActiveApexInfosCache) { for (ActiveApexInfo aai : mActiveApexInfosCache) {
if (pkg.getBaseCodePath().startsWith(aai.apexDirectory.getAbsolutePath())) { if (pkg.getBaseCodePath().startsWith(
aai.apexDirectory.getAbsolutePath() + File.separator)) {
List<String> apks = mApksInApex.get(aai.apexModuleName); List<String> apks = mApksInApex.get(aai.apexModuleName);
if (apks == null) { if (apks == null) {
apks = Lists.newArrayList(); apks = Lists.newArrayList();
mApksInApex.put(aai.apexModuleName, apks); mApksInApex.put(aai.apexModuleName, apks);
} }
Slog.i(TAG, "Registering " + pkg.getPackageName() + " as apk-in-apex of "
+ aai.apexModuleName);
apks.add(pkg.getPackageName()); apks.add(pkg.getPackageName());
} }
} }