diff options
author | naman14 <namandwivedi14@gmail.com> | 2015-05-16 18:38:14 +0530 |
---|---|---|
committer | Rohit Yengisetty <rohit@cyngn.com> | 2015-12-02 15:43:07 -0800 |
commit | 72dd839e5bb1c5940693b3755ff566b0b5f2f259 (patch) | |
tree | b84251876955147a54d9bb03a14745f7898c6772 /src | |
parent | 0929c89059bf95a2007d1a033eec8b57cc98af18 (diff) | |
download | packages_apps_Contacts-72dd839e5bb1c5940693b3755ff566b0b5f2f259.tar.gz packages_apps_Contacts-72dd839e5bb1c5940693b3755ff566b0b5f2f259.tar.bz2 packages_apps_Contacts-72dd839e5bb1c5940693b3755ff566b0b5f2f259.zip |
fix crash in QuickContact on sending contact via sms
Open QuickContact for any contact->Send Contact via sms- ActivityNotFound Exception
This is still using the previous vnd.android-dir/mms-sms which
wouldn't work on kitkat above
Change-Id: I63dcf38c20f11d0ce023cf29138d49036500fcde
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 2f0230f36..ecd1f9c32 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -73,6 +73,7 @@ import android.provider.ContactsContract.DataUsageFeedback; import android.provider.ContactsContract.Intents; import android.provider.ContactsContract.QuickContact; import android.provider.ContactsContract.RawContacts; +import android.provider.Telephony; import android.support.v7.graphics.Palette; import android.telecom.PhoneAccount; import android.telecom.TelecomManager; @@ -2778,9 +2779,13 @@ public class QuickContactActivity extends ContactsActivity { + ":" + organization + "\r\n"; sipAddress = (sipAddress == null) ? "" : getString(R.string.label_sip_address) + ":" + sipAddress + "\r\n"; - Intent intent = new Intent(Intent.ACTION_VIEW); + String defaultSmsPackageName = Telephony.Sms.getDefaultSmsPackage(this); + Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra("sms_body", name + phone + email + postal + organization + sipAddress); - intent.setType("vnd.android-dir/mms-sms"); + intent.setType("text/plain"); + if (defaultSmsPackageName != null) { + intent.setPackage(defaultSmsPackageName); + } startActivity(intent); } |