Merge cherrypicks of [14217257, 14217258, 14217339, 14217529, 14217566, 14214972, 14217508, 14216278, 14216279, 14217530, 14217281, 14215011] into rvc-qpr3-release

Change-Id: I6d9ce7c32a28ca52edd1a595c957c9926979caf5
This commit is contained in:
android-build-team Robot
2021-04-17 00:08:48 +00:00

View File

@@ -757,12 +757,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());
}
}