Loading services/core/java/com/android/server/pm/PackageManagerShellCommand.java +8 −7 Original line number Original line Diff line number Diff line Loading @@ -1146,14 +1146,15 @@ class PackageManagerShellCommand extends ShellCommand { private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName, private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName, boolean logSuccess) throws RemoteException { boolean logSuccess) throws RemoteException { final PrintWriter pw = getOutPrintWriter(); final PrintWriter pw = getOutPrintWriter(); if ("-".equals(inPath)) { if (sizeBytes <= 0) { inPath = null; pw.println("Error: must specify a APK size"); } else if (inPath != null) { return 1; final File file = new File(inPath); if (file.isFile()) { sizeBytes = file.length(); } } if (inPath != null && !"-".equals(inPath)) { pw.println("Error: APK content must be streamed"); return 1; } } inPath = null; final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId); final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId); Loading Loading
services/core/java/com/android/server/pm/PackageManagerShellCommand.java +8 −7 Original line number Original line Diff line number Diff line Loading @@ -1146,14 +1146,15 @@ class PackageManagerShellCommand extends ShellCommand { private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName, private int doWriteSplit(int sessionId, String inPath, long sizeBytes, String splitName, boolean logSuccess) throws RemoteException { boolean logSuccess) throws RemoteException { final PrintWriter pw = getOutPrintWriter(); final PrintWriter pw = getOutPrintWriter(); if ("-".equals(inPath)) { if (sizeBytes <= 0) { inPath = null; pw.println("Error: must specify a APK size"); } else if (inPath != null) { return 1; final File file = new File(inPath); if (file.isFile()) { sizeBytes = file.length(); } } if (inPath != null && !"-".equals(inPath)) { pw.println("Error: APK content must be streamed"); return 1; } } inPath = null; final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId); final SessionInfo info = mInterface.getPackageInstaller().getSessionInfo(sessionId); Loading