public ExampleNumbersTest()
 {
     PhoneNumberUtil.resetInstance();
     phoneNumberUtil = PhoneNumberUtil.getInstance();
     shortNumberInfo = new ShortNumberInfo(phoneNumberUtil);
 }
 public ExampleNumbersTest()
 {
     PhoneNumberUtil.resetInstance();
     phoneNumberUtil = PhoneNumberUtil.getInstance();
     shortNumberInfo = new ShortNumberInfo(phoneNumberUtil);
 }
 public ShortNumberInfoTest()
 {
     shortInfo = new ShortNumberInfo(phoneUtil);
 }
Ejemplo n.º 4
0
 public ShortNumberInfoTest()
 {
     shortInfo = new ShortNumberInfo(phoneUtil);
 }
Ejemplo n.º 5
0
 /**
  * Returns true if the number exactly matches an emergency service number in the given region.
  *
  * This method takes into account cases where the number might contain formatting, but doesn't
  * allow additional digits to be appended.
  *
  * @param number  the phone number to test
  * @param regionCode  the region where the phone number is being dialed
  * @return  if the number exactly matches an emergency services number in the given region.
  */
 public boolean isEmergencyNumber(String number, String regionCode)
 {
     return(ShortNumberInfo.getInstance().isEmergencyNumber(number, regionCode));
 }
Ejemplo n.º 6
0
 /**
  * Convenience method to get a list of what regions the library has metadata for.
  */
 public Set <String> getSupportedRegions()
 {
     return(ShortNumberInfo.getInstance().getSupportedRegions());
 }