From 47a07bc704193ea36aabc53642b4c760ce48defe Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Fri, 14 Oct 2022 17:45:41 +0100 Subject: [PATCH] Decouple taskbar background from overveiw scrim if taskbar is in overview - Removed all forceHideBackground calls if taskbar would be in overview - Make overview scrim transparent regardless of stash state if taskbar would be in overview Fix: 234139692 Test: Go to overview from app with ENABLE_TASKBAR_IN_OVERVIEW on/off and taskbar stashed/unstashed Change-Id: I29e811cb93894e6c9e7a75c0ea493719f15eeccb --- .../src/com/android/launcher3/QuickstepTransitionManager.java | 4 +++- .../launcher3/taskbar/LauncherTaskbarUIController.java | 2 -- .../launcher3/uioverrides/states/BackgroundAppState.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 9a1ed4d56d..d6d31c483e 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -98,6 +98,7 @@ import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener; import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorListeners; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.shortcuts.DeepShortcutView; @@ -551,7 +552,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener final boolean scrimEnabled = ENABLE_SCRIM_FOR_APP_LAUNCH.get(); if (scrimEnabled) { - boolean useTaskbarColor = mDeviceProfile.isTaskbarPresentInApps; + boolean useTaskbarColor = mDeviceProfile.isTaskbarPresentInApps + && !FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get(); int scrimColor = useTaskbarColor ? mLauncher.getResources().getColor(R.color.taskbar_background) : Themes.getAttrColor(mLauncher, R.attr.overviewScrimColor); diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java index b9b4fc3b5a..fefaaf02ac 100644 --- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java @@ -293,8 +293,6 @@ public class LauncherTaskbarUIController extends TaskbarUIController { @Override public void setSystemGestureInProgress(boolean inProgress) { super.setSystemGestureInProgress(inProgress); - // TODO(b/250645563): Don't show round corners when leaving in-app state, and remove - // forceHideBackground call entirely. if (!FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get()) { // Launcher's ScrimView will draw the background throughout the gesture. But once the // gesture ends, start drawing taskbar's background again since launcher might stop diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java index 4150d40bea..733c6a8b48 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java @@ -26,6 +26,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.allapps.AllAppsTransitionController; +import com.android.launcher3.config.FeatureFlags; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.views.RecentsView; @@ -96,7 +97,7 @@ public class BackgroundAppState extends OverviewState { @Override public int getWorkspaceScrimColor(Launcher launcher) { DeviceProfile dp = launcher.getDeviceProfile(); - if (dp.isTaskbarPresentInApps) { + if (dp.isTaskbarPresentInApps && !FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get()) { return launcher.getColor(R.color.taskbar_background); } return Color.TRANSPARENT;