Handle IME selection focus for ENABLE_DEVICE_SEARCH

Bug: 162861289
Change-Id: I15e4eae09be2aa9f89a5157fd74c95e91e64bc53
This commit is contained in:
Hyunyoung Song
2020-08-04 22:22:49 -07:00
parent 70a556da1d
commit 5dd045bec6
11 changed files with 138 additions and 21 deletions

View File

@@ -38,6 +38,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
import com.android.systemui.plugins.AllAppsRow;
import com.android.systemui.plugins.AllAppsRow.OnHeightUpdatedListener;
@@ -194,6 +195,19 @@ public class FloatingHeaderView extends LinearLayout implements
onHeightUpdated();
}
@Override
public View getFocusedChild() {
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
for (FloatingHeaderRow row : mAllRows) {
if (row.hasVisibleContent() && row.shouldDraw()) {
return row.getFocusedChild();
}
}
return null;
}
return super.getFocusedChild();
}
public void setup(AllAppsContainerView.AdapterHolder[] mAH, boolean tabsHidden) {
for (FloatingHeaderRow row : mAllRows) {
row.setup(this, mAllRows, tabsHidden);