Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb0be8a5 authored by Mike LeBeau's avatar Mike LeBeau
Browse files

Use the new RecognitionService.SERVICE_INTERFACE instead of

RecognizerIntent.ACTION_RECOGNIZE_SPEECH when finding a voice
recognition service.
parent 378ae126
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
            
+2 −1
Original line number Diff line number Diff line
@@ -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<ResolveInfo> availableRecognitionServices =
                mContext.getPackageManager().queryIntentServices(
                        new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
                        new Intent(RecognitionService.SERVICE_INTERFACE), 0);
        int numAvailable = availableRecognitionServices.size();
        
        if (numAvailable == 0) {