diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java b/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java index f129fa5d9..7e5312168 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/Utilities.java @@ -140,32 +140,9 @@ public class Utilities { if (value == null) { return 0; } - if (BuildConfig.BUILD_HOST_IS_WINDOWS) { - Matcher matcher = pattern.matcher(value); - if (matcher.find()) { - return Integer.valueOf(matcher.group()); - } - } else { - int val = 0; - try { - int start = -1, end; - for (end = 0; end < value.length(); ++end) { - char character = value.charAt(end); - boolean allowedChar = character == '-' || character >= '0' && character <= '9'; - if (allowedChar && start < 0) { - start = end; - } else if (!allowedChar && start >= 0) { - end++; - break; - } - } - if (start >= 0) { - String str = value.subSequence(start, end).toString(); -// val = parseInt(str); - val = Integer.parseInt(str); - } - } catch (Exception ignore) {} - return val; + Matcher matcher = pattern.matcher(value); + if (matcher.find()) { + return Integer.valueOf(matcher.group()); } return 0; }