Unstash hotseat immediately if go out of the launcher home.

When navigation mode is set to 3 buttons, it is possible for user to
click on recent apps button, so for such scenario taskbar should be
immediately un-stashed

Test: Manual
Set 3 buttons navigation mode. Go to Launcher home. Expand bubble bar.
Press recent apps button. Press the home button. Observe hotseat is
visible. Video:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fX0gSp18Riw8mYYAw0wj8W

Bug: 367488218
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: Id65fd9add720125a340294311d470f2be50d43f8
This commit is contained in:
mpodolian
2024-09-17 13:50:34 -07:00
parent bff3b73c8f
commit bf7a4db0de
5 changed files with 29 additions and 2 deletions
@@ -16,9 +16,9 @@
package com.android.launcher3.taskbar;
import static com.android.app.animation.Interpolators.EMPHASIZED;
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
import static com.android.launcher3.Hotseat.ALPHA_CHANNEL_TASKBAR_ALIGNMENT;
import static com.android.launcher3.Hotseat.ALPHA_CHANNEL_TASKBAR_STASH;
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP;
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_OVERVIEW;
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE;
@@ -763,6 +763,14 @@ public class TaskbarLauncherStateController {
}
}
protected void unStashHotseatInstantly() {
TaskbarStashController stashController = mControllers.taskbarStashController;
stashController.updateStateForFlag(FLAG_STASHED_FOR_BUBBLES, false);
stashController.applyState(/* duration = */ 0);
updateIconAlphaForHome(/* taskbarAlpha = */ 0,
ALPHA_CHANNEL_TASKBAR_STASH, /* updateTaskbarAlpha = */ false);
}
/**
* Resets and updates the icon alignment.
*/