From f46ebe03781e8d60f212767dc9a12b18eed72bf7 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Wed, 26 Mar 2025 17:06:39 -0700 Subject: [PATCH] Control stash handle visibility directly Stash handle alpha animator was set to control the visibility of the view. This caused issues with the state as sometimes the alpha animation conflicted with the state of the bubble bar. And caused the handle to be visible when the bubble bar (or handle) should not be. Remove the ability for the handle alpha animator to manage the visibility. We already have logic in place to ensure that the stash handle is visible or invisible based on the state. And it is not needed for the animator to manage it. Bug: 392121302 Flag: com.android.wm.shell.enable_bubble_bar Test: atest NexusLauncherRoboTests Test: move an app to bubble, move it back to fullscreen, check that handle is hidden Test: check that handle is hidden and shown when in app and opening notif shade Test: check that handle is hidden and shown when in app and locking and unlocking device Test: check that handle is shown when receiving bubbles in app and the bar stashes after showing new bubbles Change-Id: I4af8b4fa38f63b3cbc01f9cf59e66d7fc651ab13 --- .../taskbar/bubbles/BubbleStashedHandleViewController.java | 1 - .../taskbar/bubbles/stashing/TransientBubbleStashController.kt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java index ec540e0088..16e24a18cc 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java @@ -85,7 +85,6 @@ public class BubbleStashedHandleViewController { mActivity = activity; mStashedHandleView = stashedHandleView; mStashedHandleAlpha = new MultiValueAlpha(mStashedHandleView, 1); - mStashedHandleAlpha.setUpdateVisibility(true); } /** Initialize controller. */ diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt b/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt index 82bb071bc3..fd6155c1c2 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/stashing/TransientBubbleStashController.kt @@ -556,6 +556,7 @@ class TransientBubbleStashController( ) { if (bubbleBarViewController.isHiddenForNoBubbles) { // If there are no bubbles the bar and handle are invisible, nothing to do here. + cancelAnimation() return } val isStashed = stash && !isBubblesShowingOnHome && !isBubblesShowingOnOverview