DocumentsUI: Add new private intent action to select copy destination.
The CL adds INTENT_ACTION_OPEN_COPY_DESTINATION, and implements the behavior to
respond the intent action.
The directory picker:
* filter out read only roots
* return document URI instead of document tree URI
for the intent action.
BUG=b:20146034
Change-Id: I96c565100c3cdaa57cc7abd8cf6d895d148941a7
diff --git a/src/com/android/documentsui/DirectoryFragment.java b/src/com/android/documentsui/DirectoryFragment.java
index 4cf0180..61fcad2 100644
--- a/src/com/android/documentsui/DirectoryFragment.java
+++ b/src/com/android/documentsui/DirectoryFragment.java
@@ -682,7 +682,11 @@
// Pop up a dialog to pick a destination. This is inadequate but works for now.
// TODO: Implement a picker that is to spec.
- Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
+ final Intent intent = new Intent(
+ BaseActivity.ACTION_OPEN_COPY_DESTINATION_STRING,
+ Uri.EMPTY,
+ getActivity(),
+ DocumentsActivity.class);
startActivityForResult(intent, REQUEST_COPY_DESTINATION);
}