Skip to content
Snippets Groups Projects
Commit 1ea67b0c authored by Nikita Ioffe's avatar Nikita Ioffe Committed by Automerger Merge Worker
Browse files

Merge "Prevent apk-in-apex from being registered under wrong apex" into rvc-qpr-dev am: 21d910e0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14211761

Change-Id: I296b1d98f4268773f712c4b7167cd291d4731c94
parents 8380a16e 21d910e0
No related branches found
No related tags found
No related merge requests found
......@@ -766,12 +766,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());
}
}
......
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