From cf50be2c8060e62baece48dd2388a28ff1659883 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Tue, 12 Sep 2023 16:17:39 -0700 Subject: [PATCH] Use the scrim value from bubble constants in launcher Test: manual - enable persistent taskbar (light theme shows it best) - expand bubbles => observe that the scrim on taskbar matches the rest of scrim Bug: 294396107 Change-Id: I6fc516f3d57a3e8de4d80c079f3543874f289ad7 --- .../launcher3/taskbar/TaskbarScrimViewController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarScrimViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarScrimViewController.java index 1c250bf377..3a733bf6cf 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarScrimViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarScrimViewController.java @@ -18,6 +18,7 @@ package com.android.launcher3.taskbar; import static com.android.launcher3.taskbar.bubbles.BubbleBarController.BUBBLE_BAR_ENABLED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BUBBLES_MANAGE_MENU_EXPANDED; +import static com.android.wm.shell.common.bubbles.BubbleConstants.BUBBLE_EXPANDED_SCRIM_ALPHA; import android.animation.ObjectAnimator; import android.view.animation.Interpolator; @@ -35,8 +36,6 @@ import java.io.PrintWriter; public class TaskbarScrimViewController implements TaskbarControllers.LoggableTaskbarController, TaskbarControllers.BackgroundRendererController { - private static final float SCRIM_ALPHA = 0.6f; - private static final Interpolator SCRIM_ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f); private static final Interpolator SCRIM_ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f); @@ -78,8 +77,9 @@ public class TaskbarScrimViewController implements TaskbarControllers.LoggableTa final float scrimAlpha = manageMenuExpanded // When manage menu shows there's the first scrim and second scrim so figure out // what the total transparency would be. - ? (SCRIM_ALPHA + (SCRIM_ALPHA * (1 - SCRIM_ALPHA))) - : showScrim ? SCRIM_ALPHA : 0; + ? (BUBBLE_EXPANDED_SCRIM_ALPHA + (BUBBLE_EXPANDED_SCRIM_ALPHA + * (1 - BUBBLE_EXPANDED_SCRIM_ALPHA))) + : showScrim ? BUBBLE_EXPANDED_SCRIM_ALPHA : 0; showScrim(showScrim, scrimAlpha, skipAnim); }