diff --git a/src/org/thoughtcrime/securesms/RegistrationActivity.java b/src/org/thoughtcrime/securesms/RegistrationActivity.java index d90b49b019..c2ee16748b 100644 --- a/src/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/org/thoughtcrime/securesms/RegistrationActivity.java @@ -107,13 +107,7 @@ public class RegistrationActivity extends SherlockActivity { } private void initializeNumber() { - String localNumber = ((TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE)) - .getLine1Number(); - - if (!Util.isEmpty(localNumber) && !localNumber.startsWith("+")) { - if (localNumber.length() == 10) localNumber = "+1" + localNumber; - else localNumber = "+" + localNumber; - } + String localNumber = org.whispersystems.textsecure.util.Util.getDeviceE164Number(this); try { if (!Util.isEmpty(localNumber)) {