Show taskbar when external keyboard is attached, in 3 button nav mode and desktop windowing mode

Bug: 280497051
Test: Manual, turn on desktop windowing mode. Enter input mode in an app, drag it from the top to be  window mode. Verify if taskbar is present
Flag: N/A
Change-Id: I31dc922c480cd0b39a64763155777b906e3bd14a
This commit is contained in:
helencheuk committed 2024-02-02 17:31:13 +00:00
1 parent 4b75bca8c9
commit 04cd8f2852
1 file changed
+11
@@ -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;
}