diff options
author | Yorke Lee <yorkelee@google.com> | 2013-12-05 22:57:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-12-05 22:57:17 +0000 |
commit | d9091e63c7138dc5519ef1728ed2484446bf18c6 (patch) | |
tree | df35e4c58e582c725c5c2c21e27dd47cc0865333 | |
parent | 230990d7b8759eeae4dc47b8ab7fd01ca15afd49 (diff) | |
parent | 7d67c9b12eb80f707e1f3578104b3dbf0a75c88a (diff) |
Merge "Catch ActivityNotFoundException in CallDetailActivity"
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index c96cbf1cd..2b6566fa5 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -18,6 +18,7 @@ package com.android.dialer; import android.app.Activity; import android.app.LoaderManager.LoaderCallbacks; +import android.content.ActivityNotFoundException; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; @@ -643,7 +644,13 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware mMainActionPushLayerView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - startActivity(actionIntent); + try { + startActivity(actionIntent); + } catch (ActivityNotFoundException e) { + final Toast toast = Toast.makeText(CallDetailActivity.this, + R.string.add_contact_not_available, Toast.LENGTH_SHORT); + toast.show(); + } } }); mMainActionPushLayerView.setContentDescription(actionDescription); |