From a3acdb33df7c7be7ff3d9f376ff833e4b0c1d897 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 8 Jun 2015 17:07:40 -0700 Subject: Fix issue #21621920: VI: need mechanism to get current request Add new APIs to associate a Request with a name, get all active requests, and get active request by name. Also add a new Activity.onProvideReferrer() which will allow applications to propagate referrer information to the assistant (and other apps they launch) in a consistent way. Change-Id: I4ef74b5ed07447da9303a74a1bdf42e4966df363 --- core/java/android/app/ActivityThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/java/android/app/ActivityThread.java') diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index ffb3fb8..e21c04a 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -2572,9 +2572,11 @@ public final class ActivityThread { AssistStructure structure = null; AssistContent content = new AssistContent(); ActivityClientRecord r = mActivities.get(cmd.activityToken); + Uri referrer = null; if (r != null) { r.activity.getApplication().dispatchOnProvideAssistData(r.activity, data); r.activity.onProvideAssistData(data); + referrer = r.activity.onProvideReferrer(); if (cmd.requestType == ActivityManager.ASSIST_CONTEXT_FULL) { structure = new AssistStructure(r.activity); Intent activityIntent = r.activity.getIntent(); @@ -2597,7 +2599,7 @@ public final class ActivityThread { } IActivityManager mgr = ActivityManagerNative.getDefault(); try { - mgr.reportAssistContextExtras(cmd.requestToken, data, structure, content); + mgr.reportAssistContextExtras(cmd.requestToken, data, structure, content, referrer); } catch (RemoteException e) { } } -- cgit v1.1