Browse Source

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

master
Reece H. Dunn 9 years ago
parent
commit
1f6d3eeb4b
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      android/src/com/reecedunn/espeak/TtsService.java

+ 1
- 2
android/src/com/reecedunn/espeak/TtsService.java View File

private SpeechSynthesis mEngine; private SpeechSynthesis mEngine;
private SynthesisCallback mCallback; private SynthesisCallback mCallback;


private Map<String, Voice> mAvailableVoices;
private final Map<String, Voice> mAvailableVoices = new HashMap<String, Voice>();
private Voice mMatchingVoice = null; private Voice mMatchingVoice = null;


private BroadcastReceiver mOnLanguagesDownloaded = null; private BroadcastReceiver mOnLanguagesDownloaded = null;
} }


mEngine = new SpeechSynthesis(this, mSynthCallback); mEngine = new SpeechSynthesis(this, mSynthCallback);
mAvailableVoices = new HashMap<String, Voice>();
for (Voice voice : mEngine.getAvailableVoices()) { for (Voice voice : mEngine.getAvailableVoices()) {
mAvailableVoices.put(voice.name, voice); mAvailableVoices.put(voice.name, voice);
} }

Loading…
Cancel
Save