From fe6ea01602b47f3a0bfc0903a34fc682eae7fa69 Mon Sep 17 00:00:00 2001 From: Bjorn Bringert Date: Mon, 18 Apr 2011 19:19:31 +0100 Subject: [PATCH] Only return default TTS engines from TTS.getEngines() Change-Id: I31a716a33c895d2a3349889046dce83c90704a2d --- core/java/android/speech/tts/TextToSpeech.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 2add7b5e062f1..e247df8dd9f3d 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 getEngines() { PackageManager pm = mContext.getPackageManager(); Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE); - List resolveInfos = pm.queryIntentServices(intent, 0); + List resolveInfos = + pm.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY); if (resolveInfos == null) return Collections.emptyList(); List engines = new ArrayList(resolveInfos.size()); for (ResolveInfo resolveInfo : resolveInfos) {