summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ActivityThread.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-04-04 18:02:06 -0700
committerDianne Hackborn <hackbod@google.com>2014-04-24 17:48:58 -0700
commit91097de49b0f683b00e26a75dbc0ac6082344137 (patch)
tree82c3185634a71233ce2e81a3645b07b1ba55f412 /core/java/android/app/ActivityThread.java
parent23af77a3cd1febc740d885ff03ead09837df269c (diff)
downloadframeworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.zip
frameworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.tar.gz
frameworks_base-91097de49b0f683b00e26a75dbc0ac6082344137.tar.bz2
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
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r--core/java/android/app/ActivityThread.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 4562d6e..7dc21b4 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -94,6 +94,7 @@ import android.view.WindowManagerGlobal;
import android.renderscript.RenderScript;
import android.security.AndroidKeyStoreProvider;
+import com.android.internal.app.IVoiceInteractor;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.RuntimeInit;
import com.android.internal.os.SamplingProfilerIntegration;
@@ -265,6 +266,7 @@ public final class ActivityThread {
IBinder token;
int ident;
Intent intent;
+ IVoiceInteractor voiceInteractor;
Bundle state;
Activity activity;
Window window;
@@ -603,6 +605,7 @@ public final class ActivityThread {
// activity itself back to the activity manager. (matters more with ipc)
public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,
+ IVoiceInteractor voiceInteractor,
int procState, Bundle state, List<ResultInfo> pendingResults,
List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler,
@@ -615,6 +618,7 @@ public final class ActivityThread {
r.token = token;
r.ident = ident;
r.intent = intent;
+ r.voiceInteractor = voiceInteractor;
r.activityInfo = info;
r.compatInfo = compatInfo;
r.state = state;
@@ -2197,7 +2201,8 @@ public final class ActivityThread {
+ r.activityInfo.name + " with config " + config);
activity.attach(appContext, this, getInstrumentation(), r.token,
r.ident, app, r.intent, r.activityInfo, title, r.parent,
- r.embeddedID, r.lastNonConfigurationInstances, config, options);
+ r.embeddedID, r.lastNonConfigurationInstances, config, options,
+ r.voiceInteractor);
if (customIntent != null) {
activity.mIntent = customIntent;