From cb0be8a530d6fefdb05f009980c029c4da14bf98 Mon Sep 17 00:00:00 2001 From: Mike LeBeau Date: Thu, 11 Feb 2010 15:01:27 -0800 Subject: Use the new RecognitionService.SERVICE_INTERFACE instead of RecognizerIntent.ACTION_RECOGNIZE_SPEECH when finding a voice recognition service. --- core/java/android/speech/RecognitionManager.java | 2 +- .../src/com/android/providers/settings/DatabaseHelper.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/java/android/speech/RecognitionManager.java b/core/java/android/speech/RecognitionManager.java index edb7067d984e..74b9fce321dd 100644 --- a/core/java/android/speech/RecognitionManager.java +++ b/core/java/android/speech/RecognitionManager.java @@ -221,7 +221,7 @@ public class RecognitionManager { if (mConnection == null) { // first time connection mConnection = new Connection(); - Intent serviceIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); + Intent serviceIntent = new Intent(RecognitionService.SERVICE_INTERFACE); String serviceComponent = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.VOICE_RECOGNITION_SERVICE); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 4e1e0a2afc3d..b26607f4a18f 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -38,6 +38,7 @@ import android.net.ConnectivityManager; import android.os.Environment; import android.os.SystemProperties; import android.provider.Settings; +import android.speech.RecognitionService; import android.speech.RecognizerIntent; import android.text.TextUtils; import android.util.Config; @@ -996,7 +997,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { String selectedService = null; List availableRecognitionServices = mContext.getPackageManager().queryIntentServices( - new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0); + new Intent(RecognitionService.SERVICE_INTERFACE), 0); int numAvailable = availableRecognitionServices.size(); if (numAvailable == 0) { -- cgit v1.2.3-59-g8ed1b