summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-01-23 14:39:13 -0800
committerDianne Hackborn <hackbod@google.com>2013-01-23 14:39:13 -0800
commitf9c5e0fe837a3090820da502ecaabc5accc00ace (patch)
treebbc72079c958f69d9906f4a4ae803dd88fcf8083 /core/java/android/app/ApplicationThreadNative.java
parentcc7433470f00fac3bbe7835de3ded4b9bf121244 (diff)
Add new API to propagate contextual data to the assist action
When launching an assist, we have a new API allowing the current foreground activity/application to provide additional arbitrary contextual information that is stuffed in the assist intent before it is launched. Change-Id: I0b2a6f5a266dc42cc0175327fa76774f814af3b4
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 63aa5f9b5f34..f0e367cfa3c7 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -587,6 +587,17 @@ public abstract class ApplicationThreadNative extends Binder
reply.writeNoException();
return true;
}
+
+ case REQUEST_ACTIVITY_EXTRAS_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ IBinder activityToken = data.readStrongBinder();
+ IBinder requestToken = data.readStrongBinder();
+ int requestType = data.readInt();
+ requestActivityExtras(activityToken, requestToken, requestType);
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -1185,4 +1196,15 @@ class ApplicationThreadProxy implements IApplicationThread {
mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
data.recycle();
}
+
+ public void requestActivityExtras(IBinder activityToken, IBinder requestToken, int requestType)
+ throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeStrongBinder(activityToken);
+ data.writeStrongBinder(requestToken);
+ data.writeInt(requestType);
+ mRemote.transact(REQUEST_ACTIVITY_EXTRAS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
+ data.recycle();
+ }
}