mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Handle IME selection focus for ENABLE_DEVICE_SEARCH
Bug: 162861289 Change-Id: I15e4eae09be2aa9f89a5157fd74c95e91e64bc53
This commit is contained in:
@@ -527,6 +527,22 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
return mViewPager == null ? getActiveRecyclerView() : mViewPager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ItemInfo of a view that is in focus, ready to be launched by an IME.
|
||||
*/
|
||||
public ItemInfo getHighlightedItemInfo() {
|
||||
View view = getFloatingHeaderView().getFocusedChild();
|
||||
if (view != null && view.getTag() instanceof ItemInfo) {
|
||||
return ((ItemInfo) view.getTag());
|
||||
}
|
||||
if (getActiveRecyclerView().getApps().getFocusedChild() != null) {
|
||||
// TODO: when new pipelines are included, getSearchResults
|
||||
// should be supported at recycler view level and not apps list level.
|
||||
return getActiveRecyclerView().getApps().getFocusedChild().appInfo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RecyclerViewFastScroller getScrollBar() {
|
||||
AllAppsRecyclerView rv = getActiveRecyclerView();
|
||||
return rv == null ? null : rv.getScrollbar();
|
||||
@@ -658,7 +674,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
applyPadding();
|
||||
setupOverlay();
|
||||
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
|
||||
recyclerView.addItemDecoration(new AllAppsSectionDecorator(getApps()));
|
||||
recyclerView.addItemDecoration(new AllAppsSectionDecorator(
|
||||
AllAppsContainerView.this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user