Loading packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +7 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,8 @@ class CopyJob extends Job { try { final ContentResolver resolver = appContext.getContentResolver(); final Iterable<Uri> uris = srcs.getUris(appContext); int docProcessed = 0; for (Uri uri : uris) { DocumentInfo doc = DocumentInfo.fromUri(resolver, uri); if (canCopy(doc, stack.root)) { Loading @@ -280,11 +282,16 @@ class CopyJob extends Job { } else { onFileFailed(doc); } ++docProcessed; if (isCanceled()) { return; } } // If docProcessed is different than the count claimed by UrisSupplier, add the number // to failedFileCount. failedFileCount += (srcs.getItemCount() - docProcessed); } catch(IOException e) { failedFileCount += srcs.getItemCount(); throw new ResourceException("Failed to open the list of docs to copy.", e); Loading packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ final class DeleteJob extends Job { ++mDocsProcessed; } // If mDocProcessed is different than the count claimed by UrisSupplier, add the number // to failedFileCount. failedFileCount += (this.srcs.getItemCount() - mDocsProcessed); Metrics.logFileOperation(service, operationType, srcs, null); } catch(IOException e) { Log.e(TAG, "Failed to get list of docs or parent source.", e); Loading Loading
packages/DocumentsUI/src/com/android/documentsui/services/CopyJob.java +7 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,8 @@ class CopyJob extends Job { try { final ContentResolver resolver = appContext.getContentResolver(); final Iterable<Uri> uris = srcs.getUris(appContext); int docProcessed = 0; for (Uri uri : uris) { DocumentInfo doc = DocumentInfo.fromUri(resolver, uri); if (canCopy(doc, stack.root)) { Loading @@ -280,11 +282,16 @@ class CopyJob extends Job { } else { onFileFailed(doc); } ++docProcessed; if (isCanceled()) { return; } } // If docProcessed is different than the count claimed by UrisSupplier, add the number // to failedFileCount. failedFileCount += (srcs.getItemCount() - docProcessed); } catch(IOException e) { failedFileCount += srcs.getItemCount(); throw new ResourceException("Failed to open the list of docs to copy.", e); Loading
packages/DocumentsUI/src/com/android/documentsui/services/DeleteJob.java +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ final class DeleteJob extends Job { ++mDocsProcessed; } // If mDocProcessed is different than the count claimed by UrisSupplier, add the number // to failedFileCount. failedFileCount += (this.srcs.getItemCount() - mDocsProcessed); Metrics.logFileOperation(service, operationType, srcs, null); } catch(IOException e) { Log.e(TAG, "Failed to get list of docs or parent source.", e); Loading