From 59120581e424e7ab07da0f3da7ffb9eed99f979a Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Wed, 13 Apr 2022 18:48:23 +0100 Subject: [PATCH] Dismiss keyboard when leaving AllApps state Fix: 221024791 Test: Launcher3 dismiss keyboard when leaving AllApps Test: NexusLauncher can still open keyboard automatically in AllApps Change-Id: I61b50e3fc4c6ed83bd5234c5daef3b2cb428b520 --- .../launcher3/allapps/AllAppsTransitionController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index cdc313f351..14c67de6bc 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -44,6 +44,7 @@ import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.statemanager.StateManager.StateHandler; import com.android.launcher3.states.StateAnimationConfig; +import com.android.launcher3.util.UiThreadHelper; import com.android.launcher3.views.ScrimView; /** @@ -151,6 +152,10 @@ public class AllAppsTransitionController @Override public void setStateWithAnimation(LauncherState toState, StateAnimationConfig config, PendingAnimation builder) { + if (NORMAL.equals(toState) && mLauncher.isInState(ALL_APPS)) { + UiThreadHelper.hideKeyboardAsync(mLauncher, mLauncher.getAppsView().getWindowToken()); + } + float targetProgress = toState.getVerticalProgress(mLauncher); if (Float.compare(mProgress, targetProgress) == 0) { setAlphas(toState, config, builder);