Loading packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +3 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ class CopyJob extends Job { // TODO: When optimized copy kicks in, we'll not making any progress updates. // For now. Local storage isn't using optimized copy. // When copying within the same provider, try to use optimized copying and moving. // When copying within the same provider, try to use optimized copying. // If not supported, then fallback to byte-by-byte copy/move. if (srcInfo.authority.equals(dstDirInfo.authority)) { if ((srcInfo.flags & Document.FLAG_SUPPORTS_COPY) != 0) { Loading @@ -251,9 +251,10 @@ class CopyJob extends Job { dstDirInfo.derivedUri) == null) { onFileFailed(srcInfo, "Provider side copy failed for documents: " + srcInfo.derivedUri + "."); } return false; } return true; } } // If we couldn't do an optimized copy...we fall back to vanilla byte copy. Loading packages/DocumentsUI/src/com/android/documentsui/services/MoveJob.java +4 −3 Original line number Diff line number Diff line Loading @@ -78,18 +78,19 @@ final class MoveJob extends CopyJob { @Override boolean processDocument(DocumentInfo srcInfo, DocumentInfo dstDirInfo) throws RemoteException { // TODO: When optimized copy kicks in, we're not making any progress updates. FIX IT! // TODO: When optimized move kicks in, we're not making any progress updates. FIX IT! // When copying within the same provider, try to use optimized copying and moving. // When moving within the same provider, try to use optimized moving. // If not supported, then fallback to byte-by-byte copy/move. if (srcInfo.authority.equals(dstDirInfo.authority)) { if ((srcInfo.flags & Document.FLAG_SUPPORTS_MOVE) != 0) { if (DocumentsContract.moveDocument(srcClient, srcInfo.derivedUri, dstDirInfo.derivedUri) == null) { onFileFailed(srcInfo); } return false; } return true; } } // If we couldn't do an optimized copy...we fall back to vanilla byte copy. Loading Loading
packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +3 −2 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ class CopyJob extends Job { // TODO: When optimized copy kicks in, we'll not making any progress updates. // For now. Local storage isn't using optimized copy. // When copying within the same provider, try to use optimized copying and moving. // When copying within the same provider, try to use optimized copying. // If not supported, then fallback to byte-by-byte copy/move. if (srcInfo.authority.equals(dstDirInfo.authority)) { if ((srcInfo.flags & Document.FLAG_SUPPORTS_COPY) != 0) { Loading @@ -251,9 +251,10 @@ class CopyJob extends Job { dstDirInfo.derivedUri) == null) { onFileFailed(srcInfo, "Provider side copy failed for documents: " + srcInfo.derivedUri + "."); } return false; } return true; } } // If we couldn't do an optimized copy...we fall back to vanilla byte copy. Loading
packages/DocumentsUI/src/com/android/documentsui/services/MoveJob.java +4 −3 Original line number Diff line number Diff line Loading @@ -78,18 +78,19 @@ final class MoveJob extends CopyJob { @Override boolean processDocument(DocumentInfo srcInfo, DocumentInfo dstDirInfo) throws RemoteException { // TODO: When optimized copy kicks in, we're not making any progress updates. FIX IT! // TODO: When optimized move kicks in, we're not making any progress updates. FIX IT! // When copying within the same provider, try to use optimized copying and moving. // When moving within the same provider, try to use optimized moving. // If not supported, then fallback to byte-by-byte copy/move. if (srcInfo.authority.equals(dstDirInfo.authority)) { if ((srcInfo.flags & Document.FLAG_SUPPORTS_MOVE) != 0) { if (DocumentsContract.moveDocument(srcClient, srcInfo.derivedUri, dstDirInfo.derivedUri) == null) { onFileFailed(srcInfo); } return false; } return true; } } // If we couldn't do an optimized copy...we fall back to vanilla byte copy. Loading