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

Commit 483bd842 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Only send EXTRA_STACK for private intent." into mnc-dev

parents 1d4247c4 04ec6f4f
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