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

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

Force APKs to be streamed

am: d220683d

Change-Id: I617a4854f406dbdacf3b150df0bd72793112d95c
parents a7e98611 d220683d
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -1147,14 +1147,15 @@ class PackageManagerShellCommand extends ShellCommand {
    private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName,
            boolean logSuccess) throws RemoteException {
        final PrintWriter pw = getOutPrintWriter();
        if ("-".equals(inPath)) {
            inPath = null;
        } else if (inPath != null) {
            final File file = new File(inPath);
            if (file.isFile()) {
                sizeBytes = file.length();
        if (sizeBytes <= 0) {
            pw.println("Error: must specify a APK size");
            return 1;
        }
        if (inPath != null && !"-".equals(inPath)) {
            pw.println("Error: APK content must be streamed");
            return 1;
        }
        inPath = null;

        final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId);