diff options
Diffstat (limited to 'src')
5 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 5c2e17e29..9fe636fad 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -86,6 +86,7 @@ import com.android.dialer.list.PhoneFavoriteSquareTileView; import com.android.dialer.list.RegularSearchFragment; import com.android.dialer.list.SearchFragment; import com.android.dialer.list.SmartDialSearchFragment; +import com.android.dialer.util.DialerUtils; import com.android.dialer.widget.ActionBarController; import com.android.dialer.widget.SearchEditTextLayout; import com.android.dialer.widget.SearchEditTextLayout.OnBackButtonClickedListener; @@ -1108,7 +1109,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O @Override public void onCallNumberDirectly(String phoneNumber) { Intent intent = CallUtil.getCallIntent(phoneNumber, getCallOrigin()); - startActivity(intent); + DialerUtils.startActivityWithErrorToast(this, intent); mClearSearchOnPause = true; } diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index bb74cba71..f1b6f7f3b 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -185,6 +185,7 @@ public class PhoneCallDetailsHelper { } /** Sets the text of the header view for the details page of a phone call. */ + @NeededForTesting public void setCallDetailsHeader(TextView nameView, PhoneCallDetails details) { final CharSequence nameText; final CharSequence displayNumber = diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 249c30c41..f19b924fe 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -43,6 +43,7 @@ import com.android.contacts.common.util.UriUtils; import com.android.dialer.PhoneCallDetails; import com.android.dialer.PhoneCallDetailsHelper; import com.android.dialer.R; +import com.android.dialer.util.DialerUtils; import com.android.dialer.util.ExpirableCache; import com.google.common.annotations.VisibleForTesting; @@ -304,7 +305,7 @@ public class CallLogAdapter extends GroupingListAdapter final Intent intent = intentProvider.getIntent(mContext); // See IntentProvider.getCallDetailIntentProvider() for why this may be null. if (intent != null) { - mContext.startActivity(intent); + DialerUtils.startActivityWithErrorToast(mContext, intent); } } } diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index e7ae7ccad..509bd528b 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -272,10 +272,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() { @@ -979,7 +976,7 @@ public class DialpadFragment extends Fragment } public void callVoicemail() { - startActivity(getVoicemailIntent()); + DialerUtils.startActivityWithErrorToast(getActivity(), getVoicemailIntent()); hideAndClearDialpad(false); } @@ -1078,7 +1075,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); } } diff --git a/src/com/android/dialer/interactions/PhoneNumberInteraction.java b/src/com/android/dialer/interactions/PhoneNumberInteraction.java index 722b9b33e..b494fffd5 100644 --- a/src/com/android/dialer/interactions/PhoneNumberInteraction.java +++ b/src/com/android/dialer/interactions/PhoneNumberInteraction.java @@ -20,7 +20,6 @@ import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.app.FragmentManager; -import android.content.ContentValues; import android.content.Context; import android.content.CursorLoader; import android.content.DialogInterface; @@ -37,7 +36,6 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.SipAddress; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Data; -import android.provider.ContactsContract.PinnedPositions; import android.provider.ContactsContract.RawContacts; import android.view.LayoutInflater; import android.view.View; @@ -55,6 +53,8 @@ import com.android.contacts.common.activity.TransactionSafeActivity; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.R; import com.android.dialer.contact.ContactUpdateService; +import com.android.dialer.util.DialerUtils; + import com.google.common.annotations.VisibleForTesting; import java.util.ArrayList; @@ -325,7 +325,7 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> { intent = CallUtil.getCallIntent(phoneNumber, callOrigin); break; } - context.startActivity(intent); + DialerUtils.startActivityWithErrorToast(context, intent); } /** |