From 61a706203081c80f4ef72211e884059eb0d41400 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Tue, 31 Jan 2017 17:23:11 +0100 Subject: [PATCH] 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 --- src/org/thoughtcrime/securesms/util/ShortCodeUtil.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/org/thoughtcrime/securesms/util/ShortCodeUtil.java b/src/org/thoughtcrime/securesms/util/ShortCodeUtil.java index 4603f81b0d..4a4aec614e 100644 --- a/src/org/thoughtcrime/securesms/util/ShortCodeUtil.java +++ b/src/org/thoughtcrime/securesms/util/ShortCodeUtil.java @@ -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;