Migrate from Plugin SearchTarget to API search Target [3/3]
- Implement SearchServicePipeline which utilizes system Search services for AllAppsSearch Results - Parse android.app.search.SearchTarget handling for Shortcut, Slice, Settings and Play results - Aggregate SearchTargets to a tree structure for in-line Search Results Bug: 177223401 Test: Manual Change-Id: Iddc0f3691578fd332cd2df643a237b29f3eccd0d
This commit is contained in:
1 parent
7cb41c3584
commit
bdf4f71299
13 files changed
+309
-100
No files matched your search
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.search;
|
||||
|
||||
import android.app.search.SearchTarget;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
@@ -23,6 +24,8 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.systemui.plugins.shared.SearchTargetLegacy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Header text view that shows a title for a given section in All apps search
|
||||
*/
|
||||
@@ -53,4 +56,10 @@ public class SearchSectionHeaderView extends TextView implements
|
||||
setVisibility(INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySearchTarget(SearchTarget parentTarget, List<SearchTarget> children) {
|
||||
setText(parentTarget.getSearchAction().getTitle());
|
||||
setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user