From 8351b066ac66ff1a0f30c5884e3374e05cfe3b13 Mon Sep 17 00:00:00 2001 From: DrKLO Date: Tue, 25 Mar 2014 14:58:47 +0400 Subject: [PATCH] Addition to previous commit --- TMessagesProj/build.gradle | 2 +- .../org/telegram/messenger/LocaleController.java | 2 +- .../java/org/telegram/ui/ApplicationLoader.java | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index faff78e8a..1772ff6b5 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -82,7 +82,7 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 19 - versionCode 209 + versionCode 211 versionName "1.4.8" } } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java index 799cdda8b..80f3a2947 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java @@ -147,7 +147,7 @@ public class LocaleController { } public void applyLanguage(LocaleInfo localeInfo, boolean override) { - if (localeInfo == null || localeInfo == currentLocaleInfo) { + if (localeInfo == null) { return; } try { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ApplicationLoader.java b/TMessagesProj/src/main/java/org/telegram/ui/ApplicationLoader.java index 831675a9d..4d947129d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ApplicationLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ApplicationLoader.java @@ -120,7 +120,11 @@ public class ApplicationLoader extends Application { lastPauseTime = System.currentTimeMillis(); applicationContext = getApplicationContext(); NativeLoader.initNativeLibs(this); - LocaleController.getInstance(); + try { + LocaleController.getInstance(); + } catch (Exception e) { + e.printStackTrace(); + } applicationHandler = new Handler(applicationContext.getMainLooper()); @@ -142,8 +146,12 @@ public class ApplicationLoader extends Application { @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); - LocaleController.getInstance().onDeviceConfigurationChange(newConfig); - Utilities.checkDisplaySize(); + try { + LocaleController.getInstance().onDeviceConfigurationChange(newConfig); + Utilities.checkDisplaySize(); + } catch (Exception e) { + e.printStackTrace(); + } } public static void resetLastPauseTime() {