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

Commit a0246c91 authored by Nikita Ioffe's avatar Nikita Ioffe Committed by Automerger Merge Worker
Browse files

Merge "Improve exception in validate{Apex,Apk}InstallLocked" into rvc-dev am:...

Merge "Improve exception in validate{Apex,Apk}InstallLocked" into rvc-dev am: 7f636ea3 am: 84604cb8 am: 34a6a90b am: cec8fec1

Change-Id: I8ff2d05e0c932ac3810f46abc9824cc059f6b7f9
parents b3bc5749 cec8fec1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1832,7 +1832,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
            throws PackageManagerException {
        final List<File> addedFiles = getAddedApksLocked();
        if (addedFiles.isEmpty()) {
            throw new PackageManagerException(INSTALL_FAILED_INVALID_APK, "No packages staged");
            throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
                    String.format("Session: %d. No packages staged in %s", sessionId,
                          stageDir.getAbsolutePath()));
        }

        if (ArrayUtils.size(addedFiles) > 1) {
@@ -1923,7 +1925,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {

        final List<File> addedFiles = getAddedApksLocked();
        if (addedFiles.isEmpty() && removeSplitList.size() == 0) {
            throw new PackageManagerException(INSTALL_FAILED_INVALID_APK, "No packages staged");
            throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
                    String.format("Session: %d. No packages staged in %s", sessionId,
                          stageDir.getAbsolutePath()));
        }

        // Verify that all staged packages are internally consistent