From ec6a5c38dc7b8c52f9b912b655a80da741109da0 Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 20 Dec 2016 14:58:21 +0100 Subject: [PATCH] fix build --- OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java index 84d9ec52aa..367047472c 100644 --- a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java @@ -166,13 +166,13 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer { ttsRequests = 0; final float speechRate = cSpeechRate; - Locale newLocale = new Locale(language); + private Locale newLocale = new Locale(language); // #3344: Try Locale builder instead of constructor (only available from API 21) if (android.os.Build.VERSION.SDK_INT >= 21) { try { final String[] languageFields = language.split("\\_"); newLocale = new Locale.Builder().setLanguage(languageFields[0]).setScript("").setRegion(languageFields[1]).build(); - } catch (IllformedLocaleException e) { + } catch (RuntimeException e) { // Falls back to "new Locale(language)" } }