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

Commit b7a162e5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Better error message in case of multiple splits." into udc-dev am: 413bb027

parents 5a5e40d3 413bb027
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);