From dccdf95e813b3e2df28968d6f9fc3699c2a3db1a Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Tue, 4 Nov 2014 20:16:24 -0800 Subject: Protect against ActivityNotFoundException Bug: 18247185 Change-Id: I744355ea712f713d5510fa26f141ee2cce7491ff --- src/com/android/dialer/calllog/CallLogAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 50520bb42..5e762c721 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -1071,7 +1071,8 @@ public class CallLogAdapter extends GroupingListAdapter public void onClick(View v) { final Intent intent = DialtactsActivity.getAddNumberToContactIntent(details.number); - mContext.startActivity(intent); + DialerUtils.startActivityWithErrorToast(mContext, intent, + R.string.add_contact_not_available); } }); mBadgeImageView.setImageResource(R.drawable.ic_person_add_24dp); -- cgit v1.2.3