summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-12-04 15:24:13 -0800
committerBrandon Maxwell <maxwelb@google.com>2015-12-04 15:24:13 -0800
commit8104b41f9ca85c2615e9aa52cb012b5868a0314f (patch)
tree951d1bdfd3c5d47d3ac987d01e6672c972cabe9e
parent053b6cf3e3de86ec7dcd54865920b875621ef5e1 (diff)
Using Compat code for createTtsSpannable
Bug:25776171 Change-Id: Id6cccaa6af10e91defa70b1c4759cd3b48494e7c
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java3
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemViewHolder.java4
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)));
}