aboutsummaryrefslogtreecommitdiff
path: root/src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java
diff options
context:
space:
mode:
authorMatt Garnes <matt@cyngn.com>2015-08-12 11:32:31 -0700
committerMatt Garnes <matt@cyngn.com>2015-08-12 17:39:54 -0700
commitbd79d582be84824e3a5cc519ef6d9cc8d4518aa9 (patch)
tree1cf6053cfdef2f037808d5a7dd0b3254835fdb69 /src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java
parentb5c78a630e782ccf3ceb7692d1df56e6f2d42ae3 (diff)
Improve copy/move performance with nio and reintroduce cancel.
Utilize FileChannel.transferFrom to copy files faster. Chunk the file transfer so that we can check between each chunk if the user has cancelled the copy. In my tests copying a large file (650MB), this improved performance by 45%. Also, bring the cancel feature back for non secure storage. Fixes QRDL-976. Change-Id: I112cee7b9dfe682a438516f7f938dfd7538f1efb
Diffstat (limited to 'src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java')
-rw-r--r--src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java b/src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java
index 5d8073f..60ce55d 100644
--- a/src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java
+++ b/src/com/cyanogenmod/filemanager/commands/java/CopyCommand.java
@@ -83,7 +83,7 @@ public class CopyCommand extends Program implements CopyExecutable {
}
//Copy recursively
- if (!FileHelper.copyRecursive(s, d, getBufferSize(), this)) {
+ if (!FileHelper.copyRecursive(s, d, this)) {
if (isTrace()) {
Log.v(TAG, "Result: FAIL. InsufficientPermissionsException"); //$NON-NLS-1$
}