mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 19:53:39 +00:00
Merge pull request #729 from funk78/feature/use_getDeviceE164Number
FREEBIE reuse code
This commit is contained in:
commit
0da1d8818e
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user