diff options
| author | Sergey Volnov <volnov@google.com> | 2021-01-28 16:55:27 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-01-28 16:55:27 +0000 |
| commit | bf51d7482c87c4196f3bed7d8358f4193b8550d7 (patch) | |
| tree | 54b3e279db5c5cc6259c91117f8ec05461bd22cd /services/java/com/android | |
| parent | 417f6b1677508bac3bb8fb387d9c6903235b9952 (diff) | |
| parent | c3c0a1ee7e16630ffae56253d008bfd9597d7c16 (diff) | |
Merge "Add System speech recognition service." into sc-dev
Diffstat (limited to 'services/java/com/android')
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 0768bb93839d..fd8dfc32e5d3 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -333,6 +333,8 @@ public final class SystemServer implements Dumpable { "com.android.server.accessibility.AccessibilityManagerService$Lifecycle"; private static final String ADB_SERVICE_CLASS = "com.android.server.adb.AdbService$Lifecycle"; + private static final String SPEECH_RECOGNITION_MANAGER_SERVICE_CLASS = + "com.android.server.speech.SpeechRecognitionManagerService"; private static final String APP_PREDICTION_MANAGER_SERVICE_CLASS = "com.android.server.appprediction.AppPredictionManagerService"; private static final String CONTENT_SUGGESTIONS_SERVICE_CLASS = @@ -1629,12 +1631,21 @@ public final class SystemServer implements Dumpable { "MusicRecognitionManagerService not defined by OEM or disabled by flag"); } - startContentCaptureService(context, t); startAttentionService(context, t); startRotationResolverService(context, t); startSystemCaptionsManagerService(context, t); + // System Speech Recognition Service + if (deviceHasConfigString(context, + R.string.config_defaultOnDeviceSpeechRecognitionService)) { + t.traceBegin("StartSpeechRecognitionManagerService"); + mSystemServiceManager.startService(SPEECH_RECOGNITION_MANAGER_SERVICE_CLASS); + t.traceEnd(); + } else { + Slog.d(TAG, "System speech recognition is not defined by OEM"); + } + // App prediction manager service if (deviceHasConfigString(context, R.string.config_defaultAppPredictionService)) { t.traceBegin("StartAppPredictionService"); |
