diff options
Diffstat (limited to 'packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java')
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java index 61fcad2..e2e9807 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java @@ -683,10 +683,18 @@ public class DirectoryFragment extends Fragment { // Pop up a dialog to pick a destination. This is inadequate but works for now. // TODO: Implement a picker that is to spec. final Intent intent = new Intent( - BaseActivity.ACTION_OPEN_COPY_DESTINATION_STRING, + BaseActivity.DocumentsIntent.ACTION_OPEN_COPY_DESTINATION, Uri.EMPTY, getActivity(), DocumentsActivity.class); + boolean directoryCopy = false; + for (DocumentInfo info : docs) { + if (Document.MIME_TYPE_DIR.equals(info.mimeType)) { + directoryCopy = true; + break; + } + } + intent.putExtra(BaseActivity.DocumentsIntent.EXTRA_DIRECTORY_COPY, directoryCopy); startActivityForResult(intent, REQUEST_COPY_DESTINATION); } |