diff options
author | Yorke Lee <yorkelee@google.com> | 2013-12-05 12:28:04 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-03-01 18:11:42 +0000 |
commit | 6b7e8e2d15199c4b4b873cc46040c3e9bd906e0d (patch) | |
tree | 40662c840a89104ed0f1789c640cb7803781eaac /src | |
parent | b0b153f5fe5833d1a3b102e93e6e27481a90e4f7 (diff) |
Catch ActivityNotFoundException in CallDetailActivity
Bug: 12015287
Change-Id: I23b167e22d0da7f9be98b49e120b5b8ac1700e9a
(cherry picked from commit 7d67c9b12eb80f707e1f3578104b3dbf0a75c88a)
Diffstat (limited to 'src')
-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 a24940d73..a8d9d6fa7 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); |