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

Commit 8dcb4ed1 authored by Brian Attwell's avatar Brian Attwell
Browse files

Don't erase vcard type by calling setData()

BluetoothOppLauncherActivity checks that the vcard
type is correctly set. Note, fixing this doesn't help
with the bug that gmail has displaying vcards.

Bug: 21650555
Change-Id: Iac08371320bdcc9043c45504b8318027543f094d
parent 02941b68
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);