mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 00:18:26 +00:00
Catch ActivityNotFoundException on contact add intent
Fixes #4865 // FREEBIE
This commit is contained in:
parent
50d33be0aa
commit
67e6031d25
@ -658,10 +658,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleAddToContacts() {
|
private void handleAddToContacts() {
|
||||||
|
try {
|
||||||
final Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
|
final Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
|
||||||
intent.putExtra(ContactsContract.Intents.Insert.PHONE, recipients.getPrimaryRecipient().getNumber());
|
intent.putExtra(ContactsContract.Intents.Insert.PHONE, recipients.getPrimaryRecipient().getNumber());
|
||||||
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
||||||
startActivityForResult(intent, ADD_CONTACT);
|
startActivityForResult(intent, ADD_CONTACT);
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
Log.w(TAG, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleAddAttachment() {
|
private void handleAddAttachment() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user