From 96a44f0bee0346a5a234f3633f26b3da2cd728df Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 8 Jan 2020 18:14:25 +0200 Subject: [PATCH] Fix check for preferred locale --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 905a4da8d1..05a6e2d618 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -383,10 +383,12 @@ public class OsmandApplication extends MultiDexApplication { if (defaultLocale == null) { defaultLocale = Locale.getDefault(); } - if (!"".equals(country)) { - preferredLocale = new Locale(lang, country); - } else { - preferredLocale = new Locale(lang); + if (!"".equals(lang)) { + if (!"".equals(country)) { + preferredLocale = new Locale(lang, country); + } else { + preferredLocale = new Locale(lang); + } } Locale selectedLocale = null;