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

Commit eece9356 authored by Helen Cheuk's avatar Helen Cheuk Committed by Android (Google) Code Review
Browse files

Merge "Show taskbar when external keyboard is attached, in 3 button nav mode...

Merge "Show taskbar when external keyboard is attached, in 3 button nav mode and desktop windowing mode" into main
parents e35d5d8c 04cd8f28
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -60,8 +60,10 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.statehandlers.DesktopVisibilityController;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
import com.android.quickstep.LauncherActivityInterface;
import com.android.quickstep.SystemUiProxy;

import java.io.PrintWriter;
@@ -951,6 +953,15 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
        if (mActivity.isHardwareKeyboard() && DisplayController.isPinnedTaskbar(mActivity)) {
            return false;
        }

        // Do not stash if hardware keyboard is attached, in 3 button nav and desktop windowing mode
        DesktopVisibilityController visibilityController =
                LauncherActivityInterface.INSTANCE.getDesktopVisibilityController();
        if (visibilityController != null && mActivity.isHardwareKeyboard()
                && mActivity.isThreeButtonNav() && visibilityController.areFreeformTasksVisible()) {
            return false;
        }

        return mIsImeShowing || mIsImeSwitcherShowing;
    }