diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-07-15 22:11:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-15 22:11:18 +0000 |
commit | 6663f84470d21f11dc0c280feef15e1762f9aad9 (patch) | |
tree | 6079d956c4cd209edf59387d382e24904a5b1886 /packages/DocumentsUI | |
parent | bcedcde8093b48c3d013cc57dde42bdd17d6dcb9 (diff) | |
parent | b5405b45784cebf978b6102d324a1018fe66deb6 (diff) | |
download | frameworks_base-6663f84470d21f11dc0c280feef15e1762f9aad9.zip frameworks_base-6663f84470d21f11dc0c280feef15e1762f9aad9.tar.gz frameworks_base-6663f84470d21f11dc0c280feef15e1762f9aad9.tar.bz2 |
am b5405b45: am 350b99c0: am 483bd842: Merge "Only send EXTRA_STACK for private intent." into mnc-dev
* commit 'b5405b45784cebf978b6102d324a1018fe66deb6':
Only send EXTRA_STACK for private intent.
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java | 9 |
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 |