Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59120581 authored by Alex Chau's avatar Alex Chau
Browse files

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
parent fed11826
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);