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:
Jagrut Desai
2024-12-05 17:01:45 -08:00
parent 332c329276
commit 8b2e5eff9b
19 changed files with 458 additions and 86 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.launcher3.taskbar;
import android.animation.AnimatorSet;
import android.content.pm.ActivityInfo.Config;
import androidx.annotation.NonNull;
@@ -149,15 +150,15 @@ public class TaskbarControllers {
* TaskbarControllers instance, but should be careful to only access things that were created
* in constructors for now, as some controllers may still be waiting for init().
*/
public void init(@NonNull TaskbarSharedState sharedState) {
public void init(@NonNull TaskbarSharedState sharedState, AnimatorSet startAnimation) {
mAreAllControllersInitialized = false;
mSharedState = sharedState;
taskbarDragController.init(this);
navbarButtonsViewController.init(this);
rotationButtonController.init();
taskbarDragLayerController.init(this);
taskbarViewController.init(this);
taskbarDragLayerController.init(this, startAnimation);
taskbarViewController.init(this, startAnimation);
taskbarScrimViewController.init(this);
taskbarUnfoldAnimationController.init(this);
taskbarKeyguardController.init(navbarButtonsViewController);