[Search] Introduce notifyEvent api in OneSearch plugin

Bug: 204243851
Test: presubmit
Change-Id: Idba665419038f743f3d977602dab44d270f94642
This commit is contained in:
sfufa@google.com 2021-11-09 15:56:11 -08:00
parent f37d7a21f2
commit 226843cde1
1 changed files with 9 additions and 1 deletions

View File

@ -28,7 +28,7 @@ import java.util.ArrayList;
@ProvidesInterface(action = OneSearch.ACTION, version = OneSearch.VERSION) @ProvidesInterface(action = OneSearch.ACTION, version = OneSearch.VERSION)
public interface OneSearch extends Plugin { public interface OneSearch extends Plugin {
String ACTION = "com.android.systemui.action.PLUGIN_ONE_SEARCH"; String ACTION = "com.android.systemui.action.PLUGIN_ONE_SEARCH";
int VERSION = 4; int VERSION = 5;
/** /**
* Get the content provider warmed up. * Get the content provider warmed up.
@ -37,10 +37,18 @@ public interface OneSearch extends Plugin {
/** /**
* Get the suggest search target list for the query. * Get the suggest search target list for the query.
*
* @param query The query to get the search suggests for. * @param query The query to get the search suggests for.
*/ */
ArrayList<Parcelable> getSuggests(Parcelable query); ArrayList<Parcelable> getSuggests(Parcelable query);
/** Get image bitmap with the URL. */ /** Get image bitmap with the URL. */
Parcelable getImageBitmap(String imageUrl); Parcelable getImageBitmap(String imageUrl);
/**
* Notifies search events to plugin
*
* @param event the SearchTargetEvent event created due to user action
*/
void notifyEvent(Parcelable event);
} }