mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-16 00:58:21 +00:00
Search query method should support multiple consumers
Bug: 170488559 Change-Id: I64bef9523d3c3950c4ca3a4b9ce1d506d1672200
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
package com.android.systemui.plugins;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.os.CancellationSignal;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.systemui.plugins.annotations.ProvidesInterface;
|
||||
@@ -32,7 +34,7 @@ import java.util.function.Consumer;
|
||||
@ProvidesInterface(action = AllAppsSearchPlugin.ACTION, version = AllAppsSearchPlugin.VERSION)
|
||||
public interface AllAppsSearchPlugin extends Plugin {
|
||||
String ACTION = "com.android.systemui.action.PLUGIN_ALL_APPS_SEARCH_ACTIONS";
|
||||
int VERSION = 7;
|
||||
int VERSION = 8;
|
||||
|
||||
void setup(Activity activity, View view);
|
||||
|
||||
@@ -49,10 +51,21 @@ public interface AllAppsSearchPlugin extends Plugin {
|
||||
void onWindowVisibilityChanged(int visibility);
|
||||
|
||||
/**
|
||||
* Send signal when user starts typing, perform search, when search ends
|
||||
* Send signal when user starts typing, perform search, notify search target
|
||||
* event when search ends.
|
||||
*/
|
||||
void startedSearchSession();
|
||||
void performSearch(String query, Consumer<List<SearchTarget>> results);
|
||||
|
||||
/**
|
||||
* Main function that triggers search.
|
||||
*
|
||||
* @param input string that has been typed by a user
|
||||
* @param inputArgs extra info that may be relevant for the input query
|
||||
* @param results contains the result that will be rendered in all apps search surface
|
||||
* @param cancellationSignal {@link CancellationSignal} can be used to share status of current
|
||||
*/
|
||||
void query(String input, Bundle inputArgs, Consumer<List<SearchTarget>> results,
|
||||
CancellationSignal cancellationSignal);
|
||||
|
||||
/**
|
||||
* Send over search target interaction events to Plugin
|
||||
|
||||
Reference in New Issue
Block a user