diff options
| author | 2017-09-18 09:07:04 -0700 | |
|---|---|---|
| committer | 2017-09-18 09:36:29 -0700 | |
| commit | 80e8e399d0aa3327a1b0a7785e7a7a3971af32c0 (patch) | |
| tree | 6769c7cd1b5dc035a6fcfccd5dd21bec33d52e88 | |
| parent | e601150ae2646f4eb98b320e1c90ccafef7545b9 (diff) | |
Use 1MB buffer for install cmds
Similar to Package Installer App. This reduces the overhead of each
chunk and slighly speeds up package installation.
Test: Installed app via 'adb install' and 'adb shell pm install'
Change-Id: Ic8f67087e578bf0696e3d55ad3d7f3892ca2bf90
| -rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerShellCommand.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index ad989dee7b55..79faa1bf97a2 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -636,7 +636,7 @@ public final class Pm { out = session.openWrite(splitName, 0, sizeBytes); int total = 0; - byte[] buffer = new byte[65536]; + byte[] buffer = new byte[1024 * 1024]; int c; while ((c = in.read(buffer)) != -1) { total += c; diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java index 930e4f098f5f..1f03e666d072 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java @@ -1441,7 +1441,7 @@ class PackageManagerShellCommand extends ShellCommand { out = session.openWrite(splitName, 0, sizeBytes); int total = 0; - byte[] buffer = new byte[65536]; + byte[] buffer = new byte[1024 * 1024]; int c; while ((c = in.read(buffer)) != -1) { total += c; |