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

Commit 0db4ae9b authored by Brian Attwell's avatar Brian Attwell Committed by Android Git Automerger
Browse files

am 622809f0: am df45ec90: Merge "Don\'t erase vcard type by calling setData()" into mnc-dev

* commit '622809f0':
  Don't erase vcard type by calling setData()
parents 2682eea5 622809f0
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);