Initial implementation of new voice interaction API.

This gives a basic working implementation of a persist
running service that can start a voice interaction when
it wants, with the target activity(s) able to go through
the protocol to interact with it.  It may even work when
the screen is off by putting the activity manager in the
correct state to act like the screen is on.

Includes a sample app that is a voice interation service
and also has an activity it can launch.

Now that I have this initial implementation, I think I
want to rework some aspects of the API.

Change-Id: I7646d0af8fb4ac768c63a18fe3de43f8091f60e9
This commit is contained in:
Dianne Hackborn
2014-04-04 18:02:06 -07:00
parent 23af77a3cd
commit 91097de49b
52 changed files with 1992 additions and 69 deletions

View File

@@ -114,6 +114,8 @@ public final class SystemServer {
"com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle";
private static final String APPWIDGET_SERVICE_CLASS =
"com.android.server.appwidget.AppWidgetService";
private static final String VOICE_RECOGNITION_MANAGER_SERVICE_CLASS =
"com.android.server.voiceinteraction.VoiceInteractionManagerService";
private static final String PRINT_MANAGER_SERVICE_CLASS =
"com.android.server.print.PrintManagerService";
private static final String USB_SERVICE_CLASS =
@@ -290,6 +292,7 @@ public final class SystemServer {
// Activity manager runs the show.
mActivityManagerService = mSystemServiceManager.startService(
ActivityManagerService.Lifecycle.class).getService();
mActivityManagerService.setSystemServiceManager(mSystemServiceManager);
}
private void startCoreServices() {
@@ -826,6 +829,15 @@ public final class SystemServer {
} catch (Throwable e) {
reportWtf("starting Recognition Service", e);
}
try {
if (pm.hasSystemFeature(PackageManager.FEATURE_VOICE_RECOGNIZERS)) {
Slog.i(TAG, "Voice Recognition Service");
mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);
}
} catch (Throwable e) {
reportWtf("starting Voice Recognition Service", e);
}
}
try {