Force APKs to be streamed am: e2d4f5fc31

am: f5b49fb278

Change-Id: I4ca4746acfe7c027a8251e6af54bb014c9649624
This commit is contained in:
Todd Kennedy
2016-09-28 20:18:44 +00:00
committed by android-build-merger

View File

@@ -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);