summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-05 11:09:06 -0700
committerAndrew Lee <anwlee@google.com>2015-06-05 11:11:04 -0700
commit9f1caf18bf3daf34bb1724998bae5e0fce385b61 (patch)
tree0e8df8bd567fe0006b0ecd37e6c2c3dac87c833c /src
parentfeddb49ced2eb10328f9f3db52c950668472ffef (diff)
Bidiformat number to force to LTR.
Bug: 20981731 Change-Id: I659903305475691e241955555494b2596846af6f
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/DialerPhoneNumberListAdapter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
index 8a4302319..17c573f1c 100644
--- a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
+++ b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
@@ -3,6 +3,8 @@ package com.android.dialer.list;
import android.content.Context;
import android.content.res.Resources;
import android.telephony.PhoneNumberUtils;
+import android.text.BidiFormatter;
+import android.text.TextDirectionHeuristics;
import android.view.View;
import android.view.ViewGroup;
@@ -36,6 +38,8 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
private final boolean[] mShortcutEnabled = new boolean[SHORTCUT_COUNT];
+ private final BidiFormatter mBidiFormatter = BidiFormatter.getInstance();
+
public DialerPhoneNumberListAdapter(Context context) {
super(context);
@@ -141,7 +145,9 @@ public class DialerPhoneNumberListAdapter extends PhoneNumberListAdapter {
final String number = getFormattedQueryString();
switch (shortcutType) {
case SHORTCUT_DIRECT_CALL:
- text = resources.getString(R.string.search_shortcut_call_number, number);
+ text = resources.getString(
+ R.string.search_shortcut_call_number,
+ mBidiFormatter.unicodeWrap(number, TextDirectionHeuristics.LTR));
drawableId = R.drawable.ic_search_phone;
break;
case SHORTCUT_CREATE_NEW_CONTACT: