Make mAvailableVoices final to avoid a lint warning on synchronized calls.

This commit is contained in:
Reece H. Dunn
2015-10-10 09:51:19 +01:00
parent 883e97fbd7
commit 1f6d3eeb4b
@@ -67,7 +67,7 @@ public class TtsService extends TextToSpeechService {
private SpeechSynthesis mEngine;
private SynthesisCallback mCallback;
private Map<String, Voice> mAvailableVoices;
private final Map<String, Voice> mAvailableVoices = new HashMap<String, Voice>();
private Voice mMatchingVoice = null;
private BroadcastReceiver mOnLanguagesDownloaded = null;
@@ -100,7 +100,6 @@ public class TtsService extends TextToSpeechService {
}
mEngine = new SpeechSynthesis(this, mSynthCallback);
mAvailableVoices = new HashMap<String, Voice>();
for (Voice voice : mEngine.getAvailableVoices()) {
mAvailableVoices.put(voice.name, voice);
}