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

Commit 720a7816 authored by Songchun Fan's avatar Songchun Fan
Browse files

[incremental] change temp dir

Due to permission constraints, use a new temp dir for holding temporary
Incremental files/dirs.

Test: manual
Change-Id: I46b9d608225ed7ae3ccc552c6c43157d6505a66c
parent 18e52123
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ public final class IncrementalFileStorages {
    }

    private String getTempDir() {
        final String tmpDirRoot = "/data/tmp";
        final String tmpDirRoot = "/data/incremental/tmp";
        final Random random = new Random();
        final Path tmpDir =
                Paths.get(tmpDirRoot, String.valueOf(random.nextInt(Integer.MAX_VALUE - 1)));
+2 −0
Original line number Diff line number Diff line
@@ -2356,6 +2356,8 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        if (mIncrementalFileStorages != null) {
            try {
                mIncrementalFileStorages.addFile(new InstallationFile(name, lengthBytes, metadata));
                //TODO(b/136132412): merge incremental and callback installation schemes
                return;
            } catch (IOException ex) {
                throw new IllegalStateException(
                        "Failed to add and configure Incremental File: " + name, ex);