Merge "Better error message in case of multiple splits." into udc-dev am: 413bb027b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23179125 Change-Id: I935560530493d3be1d4ce12f6ccfc0886e79683b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -185,7 +185,10 @@ public class ApkLiteParseUtils {
|
|||||||
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "parseApkLite");
|
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "parseApkLite");
|
||||||
try {
|
try {
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
if (isApkFile(file)) {
|
if (!isApkFile(file)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
final ParseResult<ApkLite> result = parseApkLite(input, file, flags);
|
final ParseResult<ApkLite> result = parseApkLite(input, file, flags);
|
||||||
if (result.isError()) {
|
if (result.isError()) {
|
||||||
return input.error(result);
|
return input.error(result);
|
||||||
@@ -210,12 +213,13 @@ public class ApkLiteParseUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assert that each split is defined only oncuses-static-libe
|
// Assert that each split is defined only once
|
||||||
if (apks.put(lite.getSplitName(), lite) != null) {
|
ApkLite prev = apks.put(lite.getSplitName(), lite);
|
||||||
|
if (prev != null) {
|
||||||
return input.error(PackageManager.INSTALL_PARSE_FAILED_BAD_MANIFEST,
|
return input.error(PackageManager.INSTALL_PARSE_FAILED_BAD_MANIFEST,
|
||||||
"Split name " + lite.getSplitName()
|
"Split name " + lite.getSplitName()
|
||||||
+ " defined more than once; most recent was " + file);
|
+ " defined more than once; most recent was " + file
|
||||||
}
|
+ ", previous was " + prev.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
baseApk = apks.remove(null);
|
baseApk = apks.remove(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user