[Toast] Switch to using device config to control keyboard sync.

Bug: 234812580
Test: followed the existing pattern and tested by manually setting and
unsetting the flag through command line - `adb shell device_config put
launcher enable_web_suggest_on_default_browser <true|false>`

Change-Id: Idd479e93b628b78fdf55d826c56f69c5cfdaf46e
This commit is contained in:
Luca Zuccarini
2022-10-03 11:48:27 +00:00
parent 1aa91f0f7a
commit bda972b2c9
3 changed files with 9 additions and 7 deletions

View File

@@ -39,7 +39,6 @@ import com.android.launcher3.LauncherState;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.anim.PendingAnimation;
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.MultiPropertyFactory;
@@ -229,7 +228,7 @@ public class AllAppsTransitionController
StateAnimationConfig config, PendingAnimation builder) {
if (mLauncher.isInState(ALL_APPS) && !ALL_APPS.equals(toState)) {
// For atomic animations, we close the keyboard immediately.
if (!config.userControlled && !FeatureFlags.ENABLE_KEYBOARD_TRANSITION_SYNC.get()) {
if (!config.userControlled && !mLauncher.isKeyboardSyncEnabled()) {
mLauncher.getAppsView().getSearchUiManager().getEditText().hideKeyboard();
}