summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2014-09-11 16:10:32 +0100
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2014-09-11 16:56:46 +0100
commit3786bc549891592335be0f454609d9c626d69ef4 (patch)
tree176a14ed6c3e8ecc8064e9a100783eee603bf13c /core/java/android/speech
parentc727fb1fc2a0653f2f1355c2f5aa826a3126dcc4 (diff)
downloadframeworks_base-3786bc549891592335be0f454609d9c626d69ef4.zip
frameworks_base-3786bc549891592335be0f454609d9c626d69ef4.tar.gz
frameworks_base-3786bc549891592335be0f454609d9c626d69ef4.tar.bz2
Replace TreeSet with HashSet.
Both Locale and Voice do not implement Comparable. Bug: 17467923 Change-Id: I683577e5b18ae1892e1ccea5ea241e1d016c9517
Diffstat (limited to 'core/java/android/speech')
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index a4b6e92..9be220e 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -46,7 +46,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.Set;
-import java.util.TreeSet;
/**
*
@@ -1567,10 +1566,10 @@ public class TextToSpeech {
@Override
public Set<Locale> run(ITextToSpeechService service) throws RemoteException {
List<Voice> voices = service.getVoices();
- if (voices != null) {
- return new TreeSet<Locale>();
+ if (voices == null) {
+ return new HashSet<Locale>();
}
- TreeSet<Locale> locales = new TreeSet<Locale>();
+ HashSet<Locale> locales = new HashSet<Locale>();
for (Voice voice : voices) {
locales.add(voice.getLocale());
}
@@ -1593,7 +1592,7 @@ public class TextToSpeech {
@Override
public Set<Voice> run(ITextToSpeechService service) throws RemoteException {
List<Voice> voices = service.getVoices();
- return (voices != null) ? new TreeSet<Voice>(voices) : new TreeSet<Voice>();
+ return (voices != null) ? new HashSet<Voice>(voices) : new HashSet<Voice>();
}
}, null, "getVoices");
}