Bidiformat number to force to LTR.
Bug: 20981731
Change-Id: I659903305475691e241955555494b2596846af6f
diff --git a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
index 8a43023..17c573f 100644
--- a/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
+++ b/src/com/android/dialer/list/DialerPhoneNumberListAdapter.java
@@ -3,6 +3,8 @@
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 @@
private final boolean[] mShortcutEnabled = new boolean[SHORTCUT_COUNT];
+ private final BidiFormatter mBidiFormatter = BidiFormatter.getInstance();
+
public DialerPhoneNumberListAdapter(Context context) {
super(context);
@@ -141,7 +145,9 @@
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: