Loading java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java +19 −6 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ public class Vvm3Subscriber { } @WorkerThread @SuppressWarnings("missingPermission") public Vvm3Subscriber( ActivationTask task, PhoneAccountHandle handle, Loading @@ -175,11 +176,23 @@ public class Vvm3Subscriber { // Assuming getLine1Number() will work with VVM3. For unprovisioned users the IMAP username // is not included in the status SMS, thus no other way to get the current phone number. number = stripInternational( this.helper .getContext() .getSystemService(TelephonyManager.class) .createForPhoneAccountHandle(this.handle) .getLine1Number(); .getLine1Number()); } /** * Self provisioning gateway expects 10 digit national format, but {@link * TelephonyManager#getLine1Number()} might return e164 with "+1" at front. */ private static String stripInternational(String number) { if (number.startsWith("+1")) { number = number.substring(2); } return number; } @WorkerThread Loading Loading
java/com/android/voicemail/impl/protocol/Vvm3Subscriber.java +19 −6 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ public class Vvm3Subscriber { } @WorkerThread @SuppressWarnings("missingPermission") public Vvm3Subscriber( ActivationTask task, PhoneAccountHandle handle, Loading @@ -175,11 +176,23 @@ public class Vvm3Subscriber { // Assuming getLine1Number() will work with VVM3. For unprovisioned users the IMAP username // is not included in the status SMS, thus no other way to get the current phone number. number = stripInternational( this.helper .getContext() .getSystemService(TelephonyManager.class) .createForPhoneAccountHandle(this.handle) .getLine1Number(); .getLine1Number()); } /** * Self provisioning gateway expects 10 digit national format, but {@link * TelephonyManager#getLine1Number()} might return e164 with "+1" at front. */ private static String stripInternational(String number) { if (number.startsWith("+1")) { number = number.substring(2); } return number; } @WorkerThread Loading