From f3b23ba40d6c6c60f7e01c84df69712d7ae9bae0 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Thu, 12 Nov 2015 12:31:51 -0800 Subject: Modiying callLog context menu to force numbers LTR Bug:25516713 Change-Id: I5b239afa81c7a5e8225f21d57161a5012ab5e421 --- src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java index cb4c1e401..63fbe298e 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java +++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java @@ -28,11 +28,12 @@ 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; import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; -import android.view.ViewGroup; import android.view.ViewStub; import android.widget.ImageView; import android.widget.QuickContactBadge; @@ -278,7 +279,8 @@ 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(number)); + menu.setHeaderTitle(PhoneNumberUtils.createTtsSpannable( + BidiFormatter.getInstance().unicodeWrap(number, TextDirectionHeuristics.LTR))); } menu.add(ContextMenu.NONE, R.id.context_menu_copy_to_clipboard, ContextMenu.NONE, -- cgit v1.2.3