Hide keyboard when transitioning from all-apps state to overview state.

Sample video: http://shortn/_Jy0ynsszTd (tablet),
http://shortn/_BoBSuQGdMT (mobile phone)

Test: manual
Bug: b/240637768
Change-Id: I4c1e9f779f8c7dbe7acdb306c22d5b18965da163
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index bdab03f..597edef 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -227,7 +227,7 @@
     @Override
     public void setStateWithAnimation(LauncherState toState,
             StateAnimationConfig config, PendingAnimation builder) {
-        if (NORMAL.equals(toState) && mLauncher.isInState(ALL_APPS)) {
+        if (mLauncher.isInState(ALL_APPS) && !ALL_APPS.equals(toState)) {
             builder.addEndListener(success -> {
                 // Reset pull back progress and alpha after switching states.
                 ALL_APPS_PULL_BACK_TRANSLATION.set(this, 0f);