Merge "[pm] drop non-APK paths from LoadedApk makePath" into sc-dev am: 56b4df6954 am: 2ba1b392d7

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

Change-Id: I668ebbac4d56dde3f11a6edab91f721f0e21ee1a
This commit is contained in:
TreeHugger Robot
2021-06-23 22:13:48 +00:00
committed by Automerger Merge Worker

View File

@@ -546,6 +546,10 @@ public final class LoadedApk {
if (aInfo.sharedLibraryFiles != null) { if (aInfo.sharedLibraryFiles != null) {
int index = 0; int index = 0;
for (String lib : aInfo.sharedLibraryFiles) { for (String lib : aInfo.sharedLibraryFiles) {
// sharedLibraryFiles might contain native shared libraries that are not APK paths.
if (!lib.endsWith(".apk")) {
continue;
}
if (!outSeenPaths.contains(lib) && !outZipPaths.contains(lib)) { if (!outSeenPaths.contains(lib) && !outZipPaths.contains(lib)) {
outZipPaths.add(index, lib); outZipPaths.add(index, lib);
index++; index++;