Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 413bb027 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Better error message in case of multiple splits." into udc-dev

parents f60c9b72 5ee5a5b9
Loading
Loading
Loading
Loading
+31 −27
Original line number Diff line number Diff line
@@ -185,7 +185,10 @@ public class ApkLiteParseUtils {
        Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "parseApkLite");
        try {
            for (File file : files) {
                if (isApkFile(file)) {
                if (!isApkFile(file)) {
                    continue;
                }

                final ParseResult<ApkLite> result = parseApkLite(input, file, flags);
                if (result.isError()) {
                    return input.error(result);
@@ -210,12 +213,13 @@ public class ApkLiteParseUtils {
                    }
                }

                    // Assert that each split is defined only oncuses-static-libe
                    if (apks.put(lite.getSplitName(), lite) != null) {
                // Assert that each split is defined only once
                ApkLite prev = apks.put(lite.getSplitName(), lite);
                if (prev != null) {
                    return input.error(PackageManager.INSTALL_PARSE_FAILED_BAD_MANIFEST,
                            "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);