Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d431bdf2 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 483bd842: Merge "Only send EXTRA_STACK for private intent." into mnc-dev

* commit '483bd84280ef667e306ec7246d85423ca6b1fde7':
  Only send EXTRA_STACK for private intent.
parents d3426b48 6c3164de
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -720,13 +720,14 @@ 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.
        } 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