diff options
| author | 2011-04-18 19:19:31 +0100 | |
|---|---|---|
| committer | 2011-04-18 20:27:40 +0100 | |
| commit | fe6ea01602b47f3a0bfc0903a34fc682eae7fa69 (patch) | |
| tree | 04754c482938487e6644724e818c046ce0c0e008 | |
| parent | d20d9652fbdea2d54fb82ea2e763b51673a61002 (diff) | |
Only return default TTS engines from TTS.getEngines()
Change-Id: I31a716a33c895d2a3349889046dce83c90704a2d
| -rwxr-xr-x | core/java/android/speech/tts/TextToSpeech.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 2add7b5e062f..e247df8dd9f3 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1066,7 +1066,8 @@ public class TextToSpeech { public List<EngineInfo> getEngines() { PackageManager pm = mContext.getPackageManager(); Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE); - List<ResolveInfo> resolveInfos = pm.queryIntentServices(intent, 0); + List<ResolveInfo> resolveInfos = + pm.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY); if (resolveInfos == null) return Collections.emptyList(); List<EngineInfo> engines = new ArrayList<EngineInfo>(resolveInfos.size()); for (ResolveInfo resolveInfo : resolveInfos) { |