From 8104b41f9ca85c2615e9aa52cb012b5868a0314f Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Fri, 4 Dec 2015 15:24:13 -0800 Subject: Using Compat code for createTtsSpannable Bug:25776171 Change-Id: Id6cccaa6af10e91defa70b1c4759cd3b48494e7c --- src/com/android/dialer/calllog/CallLogAdapter.java | 3 ++- src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index ea2dbd246..a18cbc5e6 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -41,6 +41,7 @@ import android.view.View.AccessibilityDelegate; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; +import com.android.contacts.common.compat.PhoneNumberUtilsCompat; import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.PermissionsUtil; import com.android.dialer.PhoneCallDetails; @@ -463,7 +464,7 @@ public class CallLogAdapter extends GroupingListAdapter countryIso, cachedContactInfo); } CharSequence formattedNumber = info.formattedNumber == null - ? null : PhoneNumberUtils.createTtsSpannable(info.formattedNumber); + ? null : PhoneNumberUtilsCompat.createTtsSpannable(info.formattedNumber); final PhoneCallDetails details = new PhoneCallDetails( mContext, number, numberPresentation, formattedNumber, diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java index 88af54785..56d9f822a 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java +++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java @@ -27,7 +27,6 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.telecom.PhoneAccountHandle; -import android.telephony.PhoneNumberUtils; import android.text.BidiFormatter; import android.text.TextDirectionHeuristics; import android.text.TextUtils; @@ -44,6 +43,7 @@ import com.android.contacts.common.ClipboardUtils; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; import com.android.contacts.common.compat.CompatUtils; +import com.android.contacts.common.compat.PhoneNumberUtilsCompat; import com.android.contacts.common.dialog.CallSubjectDialog; import com.android.contacts.common.testing.NeededForTesting; import com.android.contacts.common.util.UriUtils; @@ -286,7 +286,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder if (callType == CallLog.Calls.VOICEMAIL_TYPE) { menu.setHeaderTitle(mContext.getResources().getText(R.string.voicemail)); } else { - menu.setHeaderTitle(PhoneNumberUtils.createTtsSpannable( + menu.setHeaderTitle(PhoneNumberUtilsCompat.createTtsSpannable( BidiFormatter.getInstance().unicodeWrap(number, TextDirectionHeuristics.LTR))); } -- cgit v1.2.3