summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-07-15 21:59:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-15 21:59:31 +0000
commitb5405b45784cebf978b6102d324a1018fe66deb6 (patch)
treedbef731aafd84c6bea1b445a40535db7182da30d /packages/DocumentsUI
parent204c2de8bb2a804991b8bbd5be9877ac1a52e150 (diff)
parent350b99c0027902db22004ea037265349155d7c38 (diff)
downloadframeworks_base-b5405b45784cebf978b6102d324a1018fe66deb6.zip
frameworks_base-b5405b45784cebf978b6102d324a1018fe66deb6.tar.gz
frameworks_base-b5405b45784cebf978b6102d324a1018fe66deb6.tar.bz2
am 350b99c0: am 483bd842: Merge "Only send EXTRA_STACK for private intent." into mnc-dev
* commit '350b99c0027902db22004ea037265349155d7c38': Only send EXTRA_STACK for private intent.
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index c541bca..a57bcc6 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -720,14 +720,15 @@ public class DocumentsActivity extends BaseActivity {
if (mState.action == ACTION_GET_CONTENT) {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- } else if (mState.action == ACTION_OPEN_TREE ||
- mState.action == ACTION_OPEN_COPY_DESTINATION) {
+ } else if (mState.action == ACTION_OPEN_TREE) {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
| Intent.FLAG_GRANT_PREFIX_URI_PERMISSION);
- // TODO: Move passing the stack to the separate ACTION_COPY action once it's implemented.
- intent.putExtra(CopyService.EXTRA_STACK, (Parcelable)mState.stack);
+ } else if (mState.action == ACTION_OPEN_COPY_DESTINATION) {
+ // Picking a copy destination is only used internally by us, so we
+ // don't need to extend permissions to the caller.
+ intent.putExtra(CopyService.EXTRA_STACK, (Parcelable) mState.stack);
} else {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION