DO NOT MERGE - Merge RQ3A.210605.005

Bug: 190855093
Merged-In: Idc989ac84777589b4bdd72012833cdbdab7e872c
Change-Id: I1e6e75762ceceffb716b5742983f5655b5ad3db3
This commit is contained in:
Xin Li
2021-06-17 23:06:37 -07:00

View File

@@ -782,12 +782,15 @@ public abstract class ApexManager {
void registerApkInApex(AndroidPackage pkg) {
synchronized (mLock) {
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);
if (apks == null) {
apks = Lists.newArrayList();
mApksInApex.put(aai.apexModuleName, apks);
}
Slog.i(TAG, "Registering " + pkg.getPackageName() + " as apk-in-apex of "
+ aai.apexModuleName);
apks.add(pkg.getPackageName());
}
}