From 8f1fd6350a04293efc53614ced9a199dec13589f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 16 Jun 2022 08:33:35 +0200 Subject: [PATCH] Debug: reset locales --- app/src/main/java/eu/faircode/email/ApplicationEx.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index f510e7871a..4b56f3b0dc 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -40,6 +40,8 @@ import android.webkit.CookieManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.core.os.LocaleListCompat; import androidx.emoji2.text.DefaultEmojiCompatConfig; import androidx.emoji2.text.EmojiCompat; import androidx.emoji2.text.FontRequestEmojiCompatConfig; @@ -62,6 +64,9 @@ public class ApplicationEx extends Application } static Context getLocalizedContext(Context context) { + if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && false) + AppCompatDelegate.setApplicationLocales(LocaleListCompat.getEmptyLocaleList()); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.contains("english")) {