Merge "Handle delete failure notifications correctly." into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-04-15 23:11:59 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 2 deletions

View File

@@ -180,6 +180,8 @@
<string name="copy_failure_alert_content">These files weren\u2019t copied: <xliff:g id="list">%1$s</xliff:g></string>
<!-- Contents of the moving failure alert dialog. [CHAR LIMIT=48] -->
<string name="move_failure_alert_content">These files weren\u2019t moved: <xliff:g id="list">%1$s</xliff:g></string>
<!-- Message shown to users when an operation to delete one or more files has failed. Presented in a dialog. [CHAR LIMIT=48] -->
<string name="delete_failure_alert_content">These files weren\u2019t deleted: <xliff:g id="list">%1$s</xliff:g></string>
<!-- Contents of the copying warning dialog due to converted files. [CHAR LIMIT=64] -->
<string name="copy_converted_warning_content">These files were converted to another format: <xliff:g id="list" example="Document.pdf, Photo.jpg, Song.ogg">%1$s</xliff:g></string>
<!-- Toast shown when a user copies files to clipboard. -->

View File

@@ -95,6 +95,9 @@ public class OperationDialogFragment extends DialogFragment {
case FileOperationService.OPERATION_COPY:
messageFormat = getString(R.string.copy_failure_alert_content);
break;
case FileOperationService.OPERATION_DELETE:
messageFormat = getString(R.string.delete_failure_alert_content);
break;
case FileOperationService.OPERATION_MOVE:
messageFormat = getString(R.string.move_failure_alert_content);
break;

View File

@@ -497,8 +497,7 @@ public class DirectoryFragment extends Fragment
if ((docFlags & Document.FLAG_PARTIAL) != 0) {
mNoCopyCount += selected ? 1 : -1;
}
if ((docFlags & Document.FLAG_SUPPORTS_DELETE) == 0
&& (docFlags & Document.FLAG_SUPPORTS_DELETE) == 0) {
if ((docFlags & Document.FLAG_SUPPORTS_DELETE) == 0) {
mNoDeleteCount += selected ? 1 : -1;
}
if ((docFlags & Document.FLAG_SUPPORTS_RENAME) != 0) {