[OneSearch] Update the plugin interface to include more answer data.

Bug: 196586652
Test: tested with OneSearchPlugin.
Change-Id: I5c645828b83f1fe5b3bd2f71911b30e22909d56f
This commit is contained in:
Becky Qiu 2021-09-07 09:35:26 -07:00
parent fd744975cc
commit 9cbbc3a4b6
1 changed files with 4 additions and 20 deletions

View File

@ -16,8 +16,7 @@
package com.android.systemui.plugins; package com.android.systemui.plugins;
import android.graphics.Bitmap; import android.os.Parcelable;
import android.text.Spanned;
import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.annotations.ProvidesInterface;
@ -29,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 = 2; int VERSION = 3;
/** /**
* Get the content provider warmed up. * Get the content provider warmed up.
@ -37,23 +36,8 @@ public interface OneSearch extends Plugin {
void warmUp(); void warmUp();
/** /**
* Get the suggests 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<Spanned> getSuggests(String query); ArrayList<Parcelable> getSuggests(Parcelable query);
/**
* Get the image bitmap for the suggest.
* @param suggest The suggest to get the image bitmap for.
*/
Bitmap getImageBitmap(Spanned suggest);
/**
* Get the subtitle for the suggest.
* @param suggest The suggest to get the subtitle for.
*/
String getSubtitle(Spanned suggest);
/** Clear any cached data or storage used in search. */
void clear();
} }