From 810bfb755d4074bec15cd7065b9dd7dedb5e6838 Mon Sep 17 00:00:00 2001 From: mpodolian Date: Mon, 12 May 2025 11:26:42 -0700 Subject: [PATCH] Only update handle alpha on system UI flag update. Added logic to check if handle view alpha should be updated during SysUi flag updates. Fixes: 417125892 Test: Manual. Create a new bubble on the home screen, observe the stash handle is not visible. Have stashed bubble bar and multiple system languages. Go to settings (or ane other apps that has input fields). Click on search to trigger keyboard pop up. Observe that stash handle is hidden. Collapse the keyboard and observe that stash handle is shown again. Flag: EXEMPT bug-fix Change-Id: I0976f37ca24ba816ee5eed6d4f1b4e6999b54c29 --- .../taskbar/bubbles/BubbleBarController.java | 17 +++++++++++++++-- .../BubbleStashedHandleViewController.java | 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java index 4ded92e5a7..798d50b012 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java @@ -33,12 +33,14 @@ import android.os.Bundle; import android.os.SystemProperties; import android.util.ArrayMap; import android.util.Log; +import android.view.View; import androidx.annotation.NonNull; import com.android.launcher3.taskbar.TaskbarSharedState; import com.android.launcher3.taskbar.bubbles.stashing.BubbleStashController; import com.android.launcher3.util.Executors.SimpleThreadFactory; +import com.android.launcher3.util.MultiPropertyFactory; import com.android.quickstep.SystemUiProxy; import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags; import com.android.wm.shell.Flags; @@ -237,8 +239,19 @@ public class BubbleBarController extends IBubblesListener.Stub { mBubbleBarViewController.setHiddenForSysui(hideBubbleBar); boolean hideHandleView = (flags & MASK_HIDE_HANDLE_VIEW) != 0; - mBubbleStashedHandleViewController.ifPresent( - controller -> controller.setHiddenForSysui(hideHandleView)); + mBubbleStashedHandleViewController.ifPresent(controller -> { + controller.setHiddenForSysui(hideHandleView); + MultiPropertyFactory.MultiProperty handleViewAlpha = + mBubbleStashController.getHandleViewAlpha(); + boolean shouldShowHandleView = handleViewAlpha != null + && !hideHandleView + && mBubbleStashController.isStashed() + && mBubbleBarViewController.hasBubbles(); + if (shouldShowHandleView) { + // TODO: (b/273592694) animate it? + handleViewAlpha.setValue(1f); + } + }); boolean sysuiLocked = (flags & MASK_SYSUI_LOCKED) != 0; mBubbleStashController.setSysuiLocked(sysuiLocked); diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java index 801b064484..16e24a18cc 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleStashedHandleViewController.java @@ -226,7 +226,6 @@ public class BubbleStashedHandleViewController { private void updateVisibilityForStateChange() { if (!mHiddenForSysui && !mHiddenForHomeButtonDisabled && !mHiddenForNoBubbles) { mStashedHandleView.setVisibility(VISIBLE); - mStashedHandleView.setAlpha(1); } else { mStashedHandleView.setVisibility(INVISIBLE); mStashedHandleView.setAlpha(0);