From 79642c3028593a3e7422b60c63ddaa190146fa00 Mon Sep 17 00:00:00 2001 From: twyen Date: Thu, 14 Dec 2017 17:27:33 -0800 Subject: Handle ActivityNotFoundException when starting intent from IntentModule Bug: 70515828 Test: IntentModuleTest PiperOrigin-RevId: 179123113 Change-Id: I3cfed7570505c058f3e86054186115db98bb2a8e --- java/com/android/dialer/contactactions/IntentModule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/contactactions/IntentModule.java b/java/com/android/dialer/contactactions/IntentModule.java index 57eb50a9b..aa7fd25a6 100644 --- a/java/com/android/dialer/contactactions/IntentModule.java +++ b/java/com/android/dialer/contactactions/IntentModule.java @@ -25,6 +25,7 @@ import android.telecom.PhoneAccountHandle; import com.android.dialer.callintent.CallInitiationType.Type; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.precall.PreCall; +import com.android.dialer.util.DialerUtils; /** * {@link ContactActionModule} useful for making easy to build modules based on starting an intent. @@ -55,7 +56,7 @@ public class IntentModule implements ContactActionModule { @Override public boolean onClick() { - context.startActivity(intent); + DialerUtils.startActivityWithErrorToast(context, intent); return true; } -- cgit v1.2.3