diff options
author | Brian Attwell <brianattwell@google.com> | 2015-06-15 15:45:03 -0700 |
---|---|---|
committer | Brian Attwell <brianattwell@google.com> | 2015-06-16 17:43:46 +0000 |
commit | 8dcb4ed13da40fc609e6913708c3d730ba4f0574 (patch) | |
tree | b87064741acbe0e702ca806cca61a4bec4acff26 /src | |
parent | 02941b68472c5ae241a03e1bbdb4117921f3d257 (diff) | |
download | packages_apps_Contacts-8dcb4ed13da40fc609e6913708c3d730ba4f0574.tar.gz packages_apps_Contacts-8dcb4ed13da40fc609e6913708c3d730ba4f0574.tar.bz2 packages_apps_Contacts-8dcb4ed13da40fc609e6913708c3d730ba4f0574.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 8baf93ef6..97185ea77 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -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); |