Merge "Force phone number to be LTR" into nyc-dev
am: 22cc0678b6
* commit '22cc0678b6240ddf13deb6adb7ca73fc9cd1dbef':
Force phone number to be LTR
Change-Id: I035a605f1d338407b31f2f76fb72f49d364ad1ec
diff --git a/src/com/android/emergency/preferences/ContactPreference.java b/src/com/android/emergency/preferences/ContactPreference.java
index 37c1066..d4549eb 100644
--- a/src/com/android/emergency/preferences/ContactPreference.java
+++ b/src/com/android/emergency/preferences/ContactPreference.java
@@ -27,6 +27,8 @@
import android.preference.Preference;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import android.text.BidiFormatter;
+import android.text.TextDirectionHeuristics;
import android.view.View;
import com.android.emergency.EmergencyContactManager;
@@ -85,7 +87,8 @@
String.format(
getContext().getResources().getString(R.string.phone_type_and_phone_number),
mContact.getPhoneType(),
- mContact.getPhoneNumber());
+ BidiFormatter.getInstance().unicodeWrap(mContact.getPhoneNumber(),
+ TextDirectionHeuristics.LTR));
setSummary(summary);
// Update the message to show the correct name.