Add System speech recognition service.

Bug: 176578753
Test: local demo, CTS will follow
Change-Id: Ia7766c506bf43a5db5b9719363da66aab263fd8d
This commit is contained in:
Eugenio Marchiori
2020-12-23 10:44:55 +00:00
committed by Sergey Volnov
parent 7e56827d84
commit c3c0a1ee7e
15 changed files with 566 additions and 35 deletions

View File

@@ -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");