make sure array has 4 fields minimum
This commit is contained in:
parent
bf37c00db7
commit
b77a6e7dc3
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
||||||
ttsRequests = 0;
|
ttsRequests = 0;
|
||||||
final float speechRate = cSpeechRate;
|
final float speechRate = cSpeechRate;
|
||||||
|
|
||||||
final String[] languageFields = (language + "___x").split("[\\_\\-]");
|
final String[] languageFields = (language + "____.").split("[\\_\\-]");
|
||||||
Locale newLocale0 = new Locale(languageFields[0], languageFields[1], languageFields[2]);
|
Locale newLocale0 = new Locale(languageFields[0], languageFields[1], languageFields[2]);
|
||||||
// #3344: Try Locale builder instead of constructor (only available from API 21), also supports script
|
// #3344: Try Locale builder instead of constructor (only available from API 21), also supports script
|
||||||
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
||||||
|
|
Loading…
Reference in a new issue