From c70f286a9f320643eaa3bc948d09aa3ef3c4289b Mon Sep 17 00:00:00 2001 From: Becky Qiu Date: Thu, 5 May 2022 15:11:50 -0700 Subject: [PATCH] [Toast] Keep keyboard up for query builder tapping Bug: 228998087 Test: manual Change-Id: Idf40d79e4a8929f23a91461959576840577bf005 --- src/com/android/launcher3/allapps/AllAppsRecyclerView.java | 4 ++-- .../android/launcher3/allapps/BaseAllAppsContainerView.java | 5 +++++ .../android/launcher3/views/RecyclerViewFastScroller.java | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java index bdfeada07c..096e2c8d35 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -228,6 +228,8 @@ public class AllAppsRecyclerView extends BaseRecyclerView { requestFocus(); mgr.logger().sendToInteractionJankMonitor( LAUNCHER_ALLAPPS_VERTICAL_SWIPE_BEGIN, this); + hideKeyboardAsync(ActivityContext.lookupContext(getContext()), + getApplicationWindowToken()); break; case SCROLL_STATE_IDLE: mgr.logger().sendToInteractionJankMonitor( @@ -243,8 +245,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView { && mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) { mEmptySearchBackground.setHotspot(e.getX(), e.getY()); } - hideKeyboardAsync(ActivityContext.lookupContext(getContext()), - getApplicationWindowToken()); return result; } diff --git a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java index 72ca5a7db4..95c67ddaa8 100644 --- a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java @@ -17,6 +17,7 @@ package com.android.launcher3.allapps; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_PERSONAL_TAB; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_WORK_TAB; +import static com.android.launcher3.util.UiThreadHelper.hideKeyboardAsync; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -458,6 +459,8 @@ public abstract class BaseAllAppsContainerView { @@ -465,6 +468,8 @@ public abstract class BaseAllAppsContainerView