From 2043d36b86b7b6693193bb92f21485f3d5432cb3 Mon Sep 17 00:00:00 2001 From: Anushree Ganjam Date: Wed, 21 Sep 2022 01:15:28 +0000 Subject: [PATCH] HideKeyboard when animations are disabled. ValueAnimator.areAnimatorsEnabled() returns false - When talkback is turned on. - when "Settings -> Accessibility -> remove animations" are turned on. In launcher code, when launcherstate goes from ALLAPPS -> NORMAL, AllAppsTransitionController.setStateWithAnimation is called only when animations are enabled and this function hides keyboard as well. However, when animations are disabled AllAppsTransitionController.setState -> onProgressAnimationEnd() is called which is where we need to hide keyboard. But the condition "if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) return;" caused the keyboard to not hide instead just return from onProgressAnimationEnd(). See https://source.corp.google.com/android-internal/packages/apps/Launcher3/src/com/android/launcher3/statemanager/StateManager.java;l=221-235;rcl=08a9bcac1f8400b44356ad4da445de8d7f360578 Bug: 239610759 Test: Manual Video : https://drive.google.com/drive/folders/1Tif2uf13dYxIgtDlELkE4SiRthr_w-dZ?resourcekey=0-7Po8nbQPxhsgLqeMJGgKIw&usp=sharing Change-Id: Ice9a0f951435d2fc1594d09414f299ce0cff775c --- .../android/launcher3/allapps/AllAppsTransitionController.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 391de8d04a..872c4fd5cd 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -319,7 +319,6 @@ public class AllAppsTransitionController * TODO: This logic should go in {@link LauncherState} */ private void onProgressAnimationEnd() { - if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) return; if (Float.compare(mProgress, 1f) == 0) { mAppsView.reset(false /* animate */); mLauncher.getAppsView().getSearchUiManager().getEditText().hideKeyboard();