SpeechSynthesis: test for and prevent duplicate voice entries

This commit is contained in:
Reece H. Dunn
2014-10-30 16:07:49 +00:00
parent cb41b502e3
commit c14cfbf912
2 changed files with 3 additions and 0 deletions
@@ -116,6 +116,7 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
final SpeechSynthesis synth = new SpeechSynthesis(getContext(), mCallback);
mVoices = new HashMap<String, Voice>();
for (Voice voice : synth.getAvailableVoices()) {
assertThat(mVoices.get(voice.name), is(nullValue()));
mVoices.put(voice.name, voice);
}
assertThat(mVoices, is(notNullValue()));