Auto-Stashing Functionality for Pinned Taskbar
This cl includes : - Refactor to remove unpinning/pinning in desktop mode with refactor of DisplayController, TaksbarPinningController, and its tests. - Combined the auto stashing conditions under one method shouldAllowTaskbarToAutoStash() which takes in consideration isTransientTaskbar, isInDesktop, and Always Show Taskbar option is turned on/off in desktop mode. - enabled taksbar divider popup support in desktop mode. - Intorduced animation for pinned taksbar when autostadhing is enabled. - Enable to onSwipeToUnstashTaskbar for TaskbarInputStashController for pinned taksbar in desktop mode. Test: Presubmit, Unit, Manual Bug: 381535785 Flag: com.android.window.flags.enable_desktop_windowing_mode Change-Id: Ie5ecf3a3c72bf8dfadf2d0c908269305fe5bad0b
This commit is contained in:
1 parent
dd367a2218
commit
f52ffc1232
14 files changed
+171
-119
No files matched your search
@@ -1924,8 +1924,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
mControllers.uiController.onSwipeToUnstashTaskbar();
|
||||
|
||||
boolean wasStashed = mControllers.taskbarStashController.isStashed();
|
||||
mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(/* stash= */ false,
|
||||
SHOULD_BUBBLES_FOLLOW_DEFAULT_VALUE, delayTaskbarBackground);
|
||||
if (isTransientTaskbar()) {
|
||||
mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(/* stash= */ false,
|
||||
SHOULD_BUBBLES_FOLLOW_DEFAULT_VALUE, delayTaskbarBackground);
|
||||
} else if (shouldAllowTaskbarToAutoStash()) {
|
||||
mControllers.taskbarStashController.updateAndAnimatePinnedTaskbar(false);
|
||||
}
|
||||
boolean isStashed = mControllers.taskbarStashController.isStashed();
|
||||
if (isStashed != wasStashed) {
|
||||
VibratorWrapper.INSTANCE.get(this).vibrateForTaskbarUnstash();
|
||||
@@ -1980,6 +1984,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
mControllers.taskbarStashController.startUnstashHint(animateForward);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if we should allow taskbar to auto stash
|
||||
*/
|
||||
public boolean shouldAllowTaskbarToAutoStash() {
|
||||
return mControllers.taskbarStashController.shouldAllowTaskbarToAutoStash();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the auto timeout for taskbar stashing. This method should only be used for taskbar
|
||||
* testing.
|
||||
|
||||
Reference in new issue
Block a user