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

Commit df45ec90 authored by Brian Attwell's avatar Brian Attwell Committed by Android (Google) Code Review
Browse files

Merge "Don't erase vcard type by calling setData()" into mnc-dev

parents 7897ac0d 8dcb4ed1
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2256,13 +2256,11 @@ public class QuickContactActivity extends ContactsActivity {
        final String lookupKey = mContactData.getLookupKey();
        final Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
        final Intent intent = new Intent(Intent.ACTION_SEND);
        intent.setType(Contacts.CONTENT_VCARD_TYPE);
        intent.putExtra(Intent.EXTRA_STREAM, shareUri);
        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);

        // Even though the data doesn't need to be set for ACTION_SEND, it does need
        // to be set so that FLAG_GRANT_READ_URI_PERMISSION can create a URI permission grant.
        intent.setData(shareUri);
        intent.setDataAndType(shareUri, Contacts.CONTENT_VCARD_TYPE);
        intent.putExtra(Intent.EXTRA_STREAM, shareUri);
        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);

        // Launch chooser to share contact via
        final CharSequence chooseTitle = getText(R.string.share_via);