From 0aaaa283cfa07797d91b8b22b40576c484020167 Mon Sep 17 00:00:00 2001 From: luvletter2333 Date: Tue, 30 Aug 2022 20:20:19 +0800 Subject: [PATCH] debug: track application locale change --- .../src/main/java/org/telegram/messenger/LocaleController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java index d06b25d8f..46dc9868e 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java @@ -1032,6 +1032,7 @@ public class LocaleController { Locale.setDefault(currentLocale); android.content.res.Configuration config = new android.content.res.Configuration(); config.locale = currentLocale; + FileLog.e("update locale to " + config.locale); ApplicationLoader.applicationContext.getResources().updateConfiguration(config, ApplicationLoader.applicationContext.getResources().getDisplayMetrics()); changingConfiguration = false; if (reloadLastFile) { @@ -2268,6 +2269,7 @@ public class LocaleController { editor.apply(); localeValues = valuesToSet; + FileLog.e(new Exception("save remote locale")); currentLocale = newLocale; currentLocaleInfo = localeInfo; if (!TextUtils.isEmpty(currentLocaleInfo.pluralLangCode)) { @@ -2283,6 +2285,7 @@ public class LocaleController { Locale.setDefault(currentLocale); Configuration config = new Configuration(); config.locale = currentLocale; + FileLog.e("update locale to " + config.locale); ApplicationLoader.applicationContext.getResources().updateConfiguration(config, ApplicationLoader.applicationContext.getResources().getDisplayMetrics()); changingConfiguration = false; }