Lines Matching defs:number

43    * Returns true if the number might be used to connect to an emergency service in the given
46 * This method takes into account cases where the number might contain formatting, or might have
49 * @param number the phone number to test
50 * @param regionCode the region where the phone number is being dialed
51 * @return if the number might be used to connect to an emergency service in the given region.
53 public boolean connectsToEmergencyNumber(String number, String regionCode) {
54 return matchesEmergencyNumberHelper(number, regionCode, true /* allows prefix match */);
58 * Returns true if the number exactly matches an emergency service number in the given region.
60 * This method takes into account cases where the number might contain formatting, but doesn't
63 * @param number the phone number to test
64 * @param regionCode the region where the phone number is being dialed
65 * @return if the number exactly matches an emergency services number in the given region.
67 public boolean isEmergencyNumber(String number, String regionCode) {
68 return matchesEmergencyNumberHelper(number, regionCode, false /* doesn't allow prefix match */);
71 private boolean matchesEmergencyNumberHelper(String number, String regionCode,
73 number = PhoneNumberUtil.extractPossibleNumber(number);
74 if (PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(number).lookingAt()) {
75 // Returns false if the number starts with a plus sign. We don't believe dialing the country
86 String normalizedNumber = PhoneNumberUtil.normalizeDigitsOnly(number);
87 // In Brazil, it is impossible to append additional digits to an emergency number to dial the
88 // number.