mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130" Revert "Merging from ub-launcher3-master @ build 6877130" Revert "Merging from ub-launcher3-master @ build 6877130" Revert submission 12738409-merge_ub-launcher3-master_6877130 Reason for revert: Introduced crashes to global presubmit Reverted Changes: I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174... Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130 I791d64951:Merging from ub-launcher3-master @ build 6877130 Icdd32ab01:Merging from ub-launcher3-master @ build 6877130 Bug: 169963211 Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
This commit is contained in:
@@ -32,7 +32,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 = 6;
|
||||
|
||||
void setup(Activity activity, View view);
|
||||
|
||||
@@ -42,12 +42,6 @@ public interface AllAppsSearchPlugin extends Plugin {
|
||||
void onStateTransitionStart(int fromState, int toState);
|
||||
void onStateTransitionComplete(int state);
|
||||
|
||||
/**
|
||||
* Send launcher window focus and visibility changed signals.
|
||||
*/
|
||||
void onWindowFocusChanged(boolean hasFocus);
|
||||
void onWindowVisibilityChanged(int visibility);
|
||||
|
||||
/**
|
||||
* Send signal when user starts typing, perform search, when search ends
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.systemui.plugins.shared;
|
||||
|
||||
import android.app.RemoteAction;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -26,69 +25,17 @@ import java.util.List;
|
||||
*/
|
||||
public class SearchTarget implements Comparable<SearchTarget> {
|
||||
|
||||
|
||||
/**
|
||||
* A bundle key for boolean value of whether remote action should be started in launcher or not
|
||||
*/
|
||||
public static final String REMOTE_ACTION_SHOULD_START = "should_start_for_result";
|
||||
public static final String REMOTE_ACTION_TOKEN = "action_token";
|
||||
|
||||
|
||||
public enum ViewType {
|
||||
|
||||
/**
|
||||
* Consists of N number of icons. (N: launcher column count)
|
||||
*/
|
||||
TOP_HIT(0),
|
||||
|
||||
/**
|
||||
* Consists of 1 icon and two subsidiary icons.
|
||||
*/
|
||||
HERO(1),
|
||||
|
||||
/**
|
||||
* Main/sub/breadcrumb texts are rendered.
|
||||
*/
|
||||
DETAIL(2),
|
||||
|
||||
/**
|
||||
* Consists of an icon, three detail strings.
|
||||
*/
|
||||
ROW(3),
|
||||
|
||||
/**
|
||||
* Consists of an icon, three detail strings and a button.
|
||||
*/
|
||||
ROW_WITH_BUTTON(4),
|
||||
|
||||
/**
|
||||
* Consists of a single slice view
|
||||
*/
|
||||
SLICE(5),
|
||||
|
||||
/**
|
||||
* Similar to hero section.
|
||||
*/
|
||||
SHORTCUT(6),
|
||||
|
||||
/**
|
||||
* Person icon and handling app icons are rendered.
|
||||
*/
|
||||
PEOPLE(7),
|
||||
|
||||
/**
|
||||
* N number of 1x1 ratio thumbnail is rendered.
|
||||
* (current N = 3)
|
||||
*/
|
||||
THUMBNAIL(8),
|
||||
|
||||
/**
|
||||
* Fallback search icon and relevant text is rendered.
|
||||
*/
|
||||
SUGGEST(9);
|
||||
PEOPLE(7);
|
||||
|
||||
private final int mId;
|
||||
|
||||
ViewType(int id) {
|
||||
mId = id;
|
||||
}
|
||||
@@ -105,15 +52,9 @@ public class SearchTarget implements Comparable<SearchTarget> {
|
||||
APP(3, "", ViewType.TOP_HIT),
|
||||
APP_HERO(4, "", ViewType.HERO),
|
||||
SHORTCUT(5, "Shortcuts", ViewType.SHORTCUT),
|
||||
PEOPLE(6, "People", ViewType.PEOPLE),
|
||||
SCREENSHOT(7, "Screenshots", ViewType.THUMBNAIL),
|
||||
ACTION(8, "Actions", ViewType.SHORTCUT),
|
||||
SUGGEST(9, "Fallback Search", ViewType.SUGGEST),
|
||||
CHROME_TAB(10, "Chrome Tab", ViewType.SHORTCUT);
|
||||
PEOPLE(6, "People", ViewType.PEOPLE);
|
||||
|
||||
private final int mId;
|
||||
|
||||
/** Used to render section title. */
|
||||
private final String mTitle;
|
||||
private final ViewType mViewType;
|
||||
|
||||
@@ -140,21 +81,19 @@ public class SearchTarget implements Comparable<SearchTarget> {
|
||||
public List<ShortcutInfo> shortcuts;
|
||||
public Bundle bundle;
|
||||
public float score;
|
||||
public String mSessionId;
|
||||
public RemoteAction mRemoteAction;
|
||||
|
||||
/**
|
||||
* Constructor to create the search target. Bundle is currently temporary to hold
|
||||
* search target primitives that cannot be expressed as java primitive objects
|
||||
* or AOSP native objects.
|
||||
*
|
||||
*/
|
||||
public SearchTarget(ItemType itemType, List<ShortcutInfo> shortcuts,
|
||||
Bundle bundle, float score, String sessionId) {
|
||||
Bundle bundle, float score) {
|
||||
this.type = itemType;
|
||||
this.shortcuts = shortcuts;
|
||||
this.bundle = bundle;
|
||||
this.score = score;
|
||||
this.mSessionId = sessionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.systemui.plugins.shared;
|
||||
|
||||
import android.app.RemoteAction;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -30,17 +29,12 @@ public class SearchTargetEvent {
|
||||
|
||||
public SearchTarget.ItemType type;
|
||||
public ShortcutInfo shortcut;
|
||||
public RemoteAction remoteAction;
|
||||
public int eventType;
|
||||
public Bundle bundle;
|
||||
public int index;
|
||||
public String sessionIdentifier;
|
||||
public float score;
|
||||
|
||||
public SearchTargetEvent(SearchTarget.ItemType itemType, int eventType, int index,
|
||||
String sessionId) {
|
||||
public SearchTargetEvent(SearchTarget.ItemType itemType, int eventType) {
|
||||
this.type = itemType;
|
||||
this.eventType = eventType;
|
||||
this.index = index;
|
||||
this.sessionIdentifier = sessionId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user