mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-21 23:59:56 +01:00
Make phone number validity test work for Faroe islands and elsewhere.
// FREEBIE
This commit is contained in:
+6
-1
@@ -14,7 +14,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compile 'com.google.protobuf:protobuf-java:2.5.0'
|
||||
compile 'com.googlecode.libphonenumber:libphonenumber:6.1'
|
||||
compile 'com.googlecode.libphonenumber:libphonenumber:7.1.0'
|
||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.0'
|
||||
|
||||
compile "org.whispersystems:axolotl-java:${axolotl_version}"
|
||||
@@ -35,6 +35,11 @@ signing {
|
||||
sign configurations.archives
|
||||
}
|
||||
|
||||
|
||||
def sonatypeRepo = sonatypeRepo != null ? sonatypeRepo : ""
|
||||
def whisperSonatypeUsername = whisperSonatypeUsername != null ? whisperSonatypeUsername : ""
|
||||
def whisperSonatypePassword = whisperSonatypePassword != null ? whisperSonatypePassword : ""
|
||||
|
||||
uploadArchives {
|
||||
configuration = configurations.archives
|
||||
repositories.mavenDeployer {
|
||||
|
||||
@@ -36,7 +36,10 @@ public class PhoneNumberFormatter {
|
||||
private static final String TAG = PhoneNumberFormatter.class.getSimpleName();
|
||||
|
||||
public static boolean isValidNumber(String number) {
|
||||
return number.matches("^\\+[0-9]{10,}");
|
||||
return number.matches("^\\+[0-9]{10,}") ||
|
||||
number.matches("^\\+298[0-9]{6}") ||
|
||||
number.matches("^\\+240[0-9]{6}") ||
|
||||
number.matches("^\\+689[0-9]{6}");
|
||||
}
|
||||
|
||||
private static String impreciseFormatNumber(String number, String localNumber)
|
||||
|
||||
Reference in New Issue
Block a user