diff options
author | 2020-09-14 09:58:35 -0700 | |
---|---|---|
committer | 2020-09-16 23:25:51 -0700 | |
commit | 5e182b60c6103f9e2263eb9d48ee5e8e0bf0f79f (patch) | |
tree | 066b525a18add00e7de6c68844d2d74ef5fa3f50 /src_plugins | |
parent | 445e4b4b9b20270c9e19082736bde7790c5fd017 (diff) |
Add launcher state and activity lifecycle in AllAppsSearchPlugin
Bug: 165678938
Change-Id: Ica7c70ad66dcc1442ff5d0c638aaf0f1ada0fc36
Diffstat (limited to 'src_plugins')
-rw-r--r-- | src_plugins/com/android/systemui/plugins/AllAppsSearchPlugin.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src_plugins/com/android/systemui/plugins/AllAppsSearchPlugin.java b/src_plugins/com/android/systemui/plugins/AllAppsSearchPlugin.java index 437cf3cfe5..4fa670f44a 100644 --- a/src_plugins/com/android/systemui/plugins/AllAppsSearchPlugin.java +++ b/src_plugins/com/android/systemui/plugins/AllAppsSearchPlugin.java @@ -16,6 +16,9 @@ package com.android.systemui.plugins; +import android.app.Activity; +import android.view.View; + import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.shared.SearchTarget; import com.android.systemui.plugins.shared.SearchTargetEvent; @@ -29,22 +32,20 @@ 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 = 5; + int VERSION = 6; + void setup(Activity activity, View view); /** - * Send signal when user enters all apps. + * Send launcher state related signals. */ - void startAllAppsSession(); + void onStateTransitionStart(int fromState, int toState); + void onStateTransitionComplete(int state); /** - * Send signal when user starts typing. + * Send signal when user starts typing, perform search, when search ends */ void startedSearchSession(); - - /** - * Send over the query and get the search results. - */ void performSearch(String query, Consumer<List<SearchTarget>> results); /** @@ -53,7 +54,8 @@ public interface AllAppsSearchPlugin extends Plugin { void notifySearchTargetEvent(SearchTargetEvent event); /** - * Send signal when user exits all apps. + * Launcher activity lifecycle callbacks */ - void endAllAppsSession(); + void onResume(int state); + void onStop(int state); }
\ No newline at end of file |