Remove obsolete workaround for DE/FI/SK shortcodes

libphonenumber supports these since December 2015 / January 2016.
Most of these changes went into libphonenumber-7.2.2 (Dec 15, 2015),
the last changes related to this into libphonenumber-7.2.4 (Jan 28, 2016).
This was about adding EU-wide helplines 116xxx (http://ec.europa.eu/digital-agenda/en/116-helplines).
See: https://github.com/googlei18n/libphonenumber/blob/master/java/release_notes.txt

Closes #6130
This commit is contained in:
Andy Staudacher 2017-01-31 17:23:11 +01:00 committed by Moxie Marlinspike
parent 69f180a5ec
commit 61a7062030

View File

@ -29,11 +29,6 @@ public class ShortCodeUtil {
String localCountryCode = util.getRegionCodeForNumber(localNumberObject);
String bareNumber = number.replaceAll("[^0-9+]", "");
// libphonenumber doesn't seem to be correct for Germany and Finland
if (bareNumber.length() <= 6 && ("DE".equals(localCountryCode) || "FI".equals(localCountryCode) || "SK".equals(localCountryCode))) {
return true;
}
// libphonenumber seems incorrect for Russia and a few other countries with 4 digit short codes.
if (bareNumber.length() <= 4 && !SHORT_COUNTRIES.contains(localCountryCode)) {
return true;