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

Commit 7e97c4a7 authored by TYM Tsai's avatar TYM Tsai Committed by Android (Google) Code Review
Browse files

Merge "Catch exception if there is no package name in the session" into main

parents e0490fbc d3a7346e
Loading
Loading
Loading
Loading
+12 −3
Original line number Original line Diff line number Diff line
@@ -2805,9 +2805,18 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
                throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
                throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
                        "Session not sealed");
                        "Session not sealed");
            }
            }
            Objects.requireNonNull(mPackageName);
            if (mPackageName == null) {
            Objects.requireNonNull(mSigningDetails);
                throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
            Objects.requireNonNull(mResolvedBaseFile);
                        "Session no package name");
            }
            if (mSigningDetails == null) {
                throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
                        "Session no signing data");
            }
            if (mResolvedBaseFile == null) {
                throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR,
                        "Session no resolved base file");
            }
            final PackageLite result;
            final PackageLite result;
            if (!isApexSession()) {
            if (!isApexSession()) {
                // For mode inherit existing, it would link/copy existing files to stage dir in
                // For mode inherit existing, it would link/copy existing files to stage dir in