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
This commit is contained in:
@ -49,7 +49,8 @@
|
||||
<uses-permission android:name="android.permission.SET_SCREEN_COMPATIBILITY" />
|
||||
<uses-permission android:name="android.permission.START_ANY_ACTIVITY" />
|
||||
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
|
||||
|
||||
<uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" />
|
||||
|
||||
<!-- WindowManager -->
|
||||
<uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
|
@ -103,7 +103,7 @@ public class SearchPanelView extends FrameLayout implements
|
||||
} else {
|
||||
// Otherwise, keyguard isn't showing so launch it from here.
|
||||
Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
|
||||
.getAssistIntent(mContext, UserHandle.USER_CURRENT);
|
||||
.getAssistIntent(mContext, true, UserHandle.USER_CURRENT);
|
||||
if (intent == null) return;
|
||||
|
||||
try {
|
||||
@ -180,7 +180,7 @@ public class SearchPanelView extends FrameLayout implements
|
||||
|
||||
private void maybeSwapSearchIcon() {
|
||||
Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
|
||||
.getAssistIntent(mContext, UserHandle.USER_CURRENT);
|
||||
.getAssistIntent(mContext, false, UserHandle.USER_CURRENT);
|
||||
if (intent != null) {
|
||||
ComponentName component = intent.getComponent();
|
||||
if (component == null || !mGlowPadView.replaceTargetDrawablesIfPresent(component,
|
||||
@ -329,6 +329,6 @@ public class SearchPanelView extends FrameLayout implements
|
||||
|
||||
public boolean isAssistantAvailable() {
|
||||
return ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
|
||||
.getAssistIntent(mContext, UserHandle.USER_CURRENT) != null;
|
||||
.getAssistIntent(mContext, false, UserHandle.USER_CURRENT) != null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user