Loading packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +9 −15 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ class CopyJob extends Job { try { mBatchSize = calculateSize(mSrcs); } catch (ResourceException e) { Log.w(TAG, "Failed to calculate total size. Copying without progress."); Log.w(TAG, "Failed to calculate total size. Copying without progress.", e); mBatchSize = -1; } Loading @@ -230,25 +230,19 @@ class CopyJob extends Job { for (int i = 0; i < mSrcs.size() && !isCanceled(); ++i) { srcInfo = mSrcs.get(i); // Guard unsupported recursive operation. try { if (dstInfo.equals(srcInfo) || isDescendentOf(srcInfo, dstInfo)) { throw new ResourceException("Cannot copy to itself recursively."); } } catch (ResourceException e) { Log.e(TAG, e.toString()); onFileFailed(srcInfo); continue; } if (DEBUG) Log.d(TAG, "Copying " + srcInfo.displayName + " (" + srcInfo.derivedUri + ")" + " to " + dstInfo.displayName + " (" + dstInfo.derivedUri + ")"); try { if (dstInfo.equals(srcInfo) || isDescendentOf(srcInfo, dstInfo)) { Log.e(TAG, "Skipping recursive copy of " + srcInfo.derivedUri); onFileFailed(srcInfo); } else { processDocument(srcInfo, null, dstInfo); } } catch (ResourceException e) { Log.e(TAG, e.toString()); Log.e(TAG, "Failed to copy " + srcInfo.derivedUri, e); onFileFailed(srcInfo); } } Loading Loading @@ -296,7 +290,7 @@ class CopyJob extends Job { } } catch (RemoteException | RuntimeException e) { Log.e(TAG, "Provider side copy failed for: " + src.derivedUri + " due to an exception: " + e); + " due to an exception.", e); } // If optimized copy fails, then fallback to byte-by-byte copy. Loading packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ final class DeleteJob extends Job { return; } } catch (ResourceException e) { Log.e(TAG, "Failed to delete document @ " + doc.derivedUri); Log.e(TAG, "Failed to delete document @ " + doc.derivedUri, e); onFileFailed(doc); } Loading packages/DocumentsUI/src/com/android/documentsui/services/MoveJob.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ final class MoveJob extends CopyJob { } } catch (RemoteException | RuntimeException e) { Log.e(TAG, "Provider side move failed for: " + src.derivedUri + " due to an exception: " + e); + " due to an exception: ", e); } // If optimized move fails, then fallback to byte-by-byte copy. if (DEBUG) Log.d(TAG, "Fallback to byte-by-byte move for: " + src.derivedUri); Loading Loading
packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +9 −15 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ class CopyJob extends Job { try { mBatchSize = calculateSize(mSrcs); } catch (ResourceException e) { Log.w(TAG, "Failed to calculate total size. Copying without progress."); Log.w(TAG, "Failed to calculate total size. Copying without progress.", e); mBatchSize = -1; } Loading @@ -230,25 +230,19 @@ class CopyJob extends Job { for (int i = 0; i < mSrcs.size() && !isCanceled(); ++i) { srcInfo = mSrcs.get(i); // Guard unsupported recursive operation. try { if (dstInfo.equals(srcInfo) || isDescendentOf(srcInfo, dstInfo)) { throw new ResourceException("Cannot copy to itself recursively."); } } catch (ResourceException e) { Log.e(TAG, e.toString()); onFileFailed(srcInfo); continue; } if (DEBUG) Log.d(TAG, "Copying " + srcInfo.displayName + " (" + srcInfo.derivedUri + ")" + " to " + dstInfo.displayName + " (" + dstInfo.derivedUri + ")"); try { if (dstInfo.equals(srcInfo) || isDescendentOf(srcInfo, dstInfo)) { Log.e(TAG, "Skipping recursive copy of " + srcInfo.derivedUri); onFileFailed(srcInfo); } else { processDocument(srcInfo, null, dstInfo); } } catch (ResourceException e) { Log.e(TAG, e.toString()); Log.e(TAG, "Failed to copy " + srcInfo.derivedUri, e); onFileFailed(srcInfo); } } Loading Loading @@ -296,7 +290,7 @@ class CopyJob extends Job { } } catch (RemoteException | RuntimeException e) { Log.e(TAG, "Provider side copy failed for: " + src.derivedUri + " due to an exception: " + e); + " due to an exception.", e); } // If optimized copy fails, then fallback to byte-by-byte copy. Loading
packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ final class DeleteJob extends Job { return; } } catch (ResourceException e) { Log.e(TAG, "Failed to delete document @ " + doc.derivedUri); Log.e(TAG, "Failed to delete document @ " + doc.derivedUri, e); onFileFailed(doc); } Loading
packages/DocumentsUI/src/com/android/documentsui/services/MoveJob.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ final class MoveJob extends CopyJob { } } catch (RemoteException | RuntimeException e) { Log.e(TAG, "Provider side move failed for: " + src.derivedUri + " due to an exception: " + e); + " due to an exception: ", e); } // If optimized move fails, then fallback to byte-by-byte copy. if (DEBUG) Log.d(TAG, "Fallback to byte-by-byte move for: " + src.derivedUri); Loading