From 91db13b01ba736ca39620d89503dd068dd5847cb Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 11 Jan 2019 18:06:11 +0100 Subject: [PATCH] format phone number with narrow non-breaking space --- .../eu/siacs/conversations/ui/EnterPhoneNumberActivity.java | 2 +- .../eu/siacs/conversations/utils/PhoneNumberUtilWrapper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quicksy/java/eu/siacs/conversations/ui/EnterPhoneNumberActivity.java b/src/quicksy/java/eu/siacs/conversations/ui/EnterPhoneNumberActivity.java index f30ec7025..fa98ed01e 100644 --- a/src/quicksy/java/eu/siacs/conversations/ui/EnterPhoneNumberActivity.java +++ b/src/quicksy/java/eu/siacs/conversations/ui/EnterPhoneNumberActivity.java @@ -151,7 +151,7 @@ public class EnterPhoneNumberActivity extends XmppActivity implements QuickConve this.binding.countryCode.setText(String.valueOf(phoneNumber.getCountryCode())); number.clear(); number.append(String.valueOf(phoneNumber.getNationalNumber())); - final String formattedPhoneNumber = PhoneNumberUtilWrapper.getInstance(this).format(phoneNumber, PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL); + final String formattedPhoneNumber = PhoneNumberUtilWrapper.getInstance(this).format(phoneNumber, PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL).replace(' ','\u202F'); if (PhoneNumberUtilWrapper.getInstance(this).isValidNumber(phoneNumber)) { builder.setMessage(Html.fromHtml(getString(R.string.we_will_be_verifying, formattedPhoneNumber))); diff --git a/src/quicksy/java/eu/siacs/conversations/utils/PhoneNumberUtilWrapper.java b/src/quicksy/java/eu/siacs/conversations/utils/PhoneNumberUtilWrapper.java index 599bfdf4b..0b52997e8 100644 --- a/src/quicksy/java/eu/siacs/conversations/utils/PhoneNumberUtilWrapper.java +++ b/src/quicksy/java/eu/siacs/conversations/utils/PhoneNumberUtilWrapper.java @@ -24,7 +24,7 @@ public class PhoneNumberUtilWrapper { public static String toFormattedPhoneNumber(Context context, Jid jid) { try { - return getInstance(context).format(toPhoneNumber(context, jid), PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL); + return getInstance(context).format(toPhoneNumber(context, jid), PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL).replace(' ','\u202F'); } catch (Exception e) { return jid.getEscapedLocal(); }