diff options
author | Yorke Lee <yorkelee@google.com> | 2014-06-19 17:09:33 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-06-19 17:09:33 -0700 |
commit | 7d20f8273886411ffc864231d59f780e450de3db (patch) | |
tree | b25bd2862260abc12f6c37b9f02a30e0d6b81003 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | eb00573bbc1333a39a158a78dae36911e2cc6ee6 (diff) |
Fix Dialer tests
Fix Dialer tests and also wrap all startActivity calls that have
the potential to fail with a catch block for ActivityNotFoundException
Change-Id: I02ce4b985eeb0e3e607b8008a333e02168acd378
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index bb5880295..cc4275518 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -279,10 +279,7 @@ public class DialpadFragment extends Fragment * Return an Intent for launching voicemail screen. */ private static Intent getVoicemailIntent() { - final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED, - Uri.fromParts("voicemail", "", null)); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - return intent; + return CallUtil.getCallIntent(Uri.fromParts("voicemail", "", null)); } private TelephonyManager getTelephonyManager() { @@ -986,7 +983,7 @@ public class DialpadFragment extends Fragment } public void callVoicemail() { - startActivity(getVoicemailIntent()); + DialerUtils.startActivityWithErrorToast(getActivity(), getVoicemailIntent()); hideAndClearDialpad(false); } @@ -1085,7 +1082,7 @@ public class DialpadFragment extends Fragment final Intent intent = CallUtil.getCallIntent(number, (getActivity() instanceof DialtactsActivity ? ((DialtactsActivity) getActivity()).getCallOrigin() : null)); - startActivity(intent); + DialerUtils.startActivityWithErrorToast(getActivity(), intent); hideAndClearDialpad(false); } } |