mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Desktop Mode Taskbar Recreate Animation
This Cl includes
- addition of entry/exit callback methods in DesktopVisibilityController.
- taskbar manager now listens to desktop mode changes.
- TaskbarBackrgroundRedererer can now individually animation backgrounds for transient and persistent taskbars
- new channel for taskbar icon alpha added to TaskbarViewController
- new animated float to handle background alpha while we are recreating taskbar with animation.
Solution:
we use the callabck we get from DekstopVisibilty for entry/exit to first change logic of when we are considered inDesktopMode. Upon entry/exit we notify display controller for info change.
we also at notify taskbar manager who is now a listener to the desktop mode change and start the recreate process. TaskbarManager first animates existing taskbar out of user view and then follows the original recreate flow.
Test: Presubmit
Bug: 343882478
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ib827564cacd194f499e7d9b1965e2bb13e3548ab
This commit is contained in:
@@ -1811,8 +1811,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
}
|
||||
|
||||
/** Get animation duration for taskbar for going to home. */
|
||||
public static int getTaskbarToHomeDuration(boolean isPinnedTaskbar) {
|
||||
return getTaskbarToHomeDuration(false, isPinnedTaskbar);
|
||||
public static int getTaskbarToHomeDuration(boolean isPinnedTaskbarAndNotInDesktopMode) {
|
||||
return getTaskbarToHomeDuration(false, isPinnedTaskbarAndNotInDesktopMode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1821,8 +1821,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
* @param shouldOverrideToFastAnimation should overwrite scaling reveal home animation duration
|
||||
*/
|
||||
public static int getTaskbarToHomeDuration(boolean shouldOverrideToFastAnimation,
|
||||
boolean isPinnedTaskbar) {
|
||||
if (isPinnedTaskbar) {
|
||||
boolean isPinnedTaskbarAndNotInDesktopMode) {
|
||||
if (isPinnedTaskbarAndNotInDesktopMode) {
|
||||
return PINNED_TASKBAR_TRANSITION_DURATION;
|
||||
} else if (enableScalingRevealHomeAnimation() && !shouldOverrideToFastAnimation) {
|
||||
return TASKBAR_TO_HOME_DURATION_SLOW;
|
||||
|
||||
Reference in New Issue
Block a user