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

Commit 1e285597 authored by Todd Kennedy's avatar Todd Kennedy Committed by android-build-merger
Browse files

Merge "resolve stage dir before validation" into oc-mr1-dev

am: 40f9beb5

Change-Id: I37468179ec0c5b6f7c047b7f4eb34f147fc70666
parents 41c7c711 40f9beb5
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -807,13 +807,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
            throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, "Session not sealed");
        }

        try {
            resolveStageDirLocked();
        } catch (IOException e) {
            throw new PackageManagerException(INSTALL_FAILED_CONTAINER_ERROR,
                    "Failed to resolve stage location", e);
        }

        Preconditions.checkNotNull(mPackageName);
        Preconditions.checkNotNull(mSignatures);
        Preconditions.checkNotNull(mResolvedBaseFile);
@@ -934,6 +927,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        mResolvedStagedFiles.clear();
        mResolvedInheritedFiles.clear();

        try {
            resolveStageDirLocked();
        } catch (IOException e) {
            throw new PackageManagerException(INSTALL_FAILED_CONTAINER_ERROR,
                    "Failed to resolve stage location", e);
        }

        final File[] removedFiles = mResolvedStageDir.listFiles(sRemovedFilter);
        final List<String> removeSplitList = new ArrayList<>();
        if (!ArrayUtils.isEmpty(removedFiles)) {