Migrate from Plugin SearchTarget to API search Target [2/3]
- Adds support for android.app.search.SearchTarget in plugin while maintaining plugin SearchTarget support - Introduces SEARCH_TARGET_LEGACY temporary to switch between plugin and sdk variants. - Maps resultType and layoutType pairs to the appropriate view Bug: 177223401 Test: Manual Change-Id: If8d4bb7c21c47a12447dcb0c56eed8781bd21e54
This commit is contained in:
1 parent
992ab43390
commit
a60d1f9be7
21 files changed
+209
-111
No files matched your search
@@ -21,7 +21,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.systemui.plugins.shared.SearchTarget;
|
||||
import com.android.systemui.plugins.shared.SearchTargetLegacy;
|
||||
|
||||
/**
|
||||
* Header text view that shows a title for a given section in All apps search
|
||||
@@ -44,7 +44,7 @@ public class SearchSectionHeaderView extends TextView implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySearchTarget(SearchTarget searchTarget) {
|
||||
public void applySearchTarget(SearchTargetLegacy searchTarget) {
|
||||
String title = searchTarget.getExtras().getString("title");
|
||||
if (title == null || !title.isEmpty()) {
|
||||
setText(title);
|
||||
|
||||
Reference in new issue
Block a user