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

Commit 7129e984 authored by Calin Juravle's avatar Calin Juravle Committed by android-build-merger
Browse files

Merge "Allow adb to pull profile snapshots" into pi-dev am: b7aea6d3

am: 5e38cbb8

Change-Id: Ifcb45f3f485ed3b3a7bce060d52ee84040728c1a
parents 35222b7b 5e38cbb8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.system.ErrnoException;
import android.system.Os;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.ArraySet;
@@ -1374,7 +1376,9 @@ class PackageManagerShellCommand extends ShellCommand {
            try (OutputStream outStream = new FileOutputStream(outputProfilePath)) {
                Streams.copy(inStream, outStream);
            }
        } catch (IOException e) {
            // Give read permissions to the other group.
            Os.chmod(outputProfilePath, /*mode*/ 0644 );
        } catch (IOException | ErrnoException e) {
            pw.println("Error when reading the profile fd: " + e.getMessage());
            e.printStackTrace(pw);
            return -1;