From ccb3a5c25c1f6a5ba388aa91df262103e54e1354 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Tue, 11 Mar 2025 05:41:22 +0000 Subject: [PATCH] Adds all_apps_blur flag. This enables blur both for Taskbar and Launcher, but in slightly different ways. For Taskbar All Apps, we apply blur to the overlay window, and for Launcher All Apps, we utilize the existing DepthController to blur the wallpaper window. For similicity, we currently fade out workspace/hotseat to avoid awkward view + window blurs which don't look that good. This is not the POR, but I think it achieves most of the effect and will help us get some blur exposure. Separately I will continue to investigate options such as blurring workspace in a clever way so it feels blended with the wallpaper, reusing the Taskbar window and connecting it to LauncherState, or using a SurfaceView (though I spent quite some time trying this and it seemed the same as the original issue). In both cases, we use a 20-30% opacity scrim with a set color, and a panel that blends 40% opacity of a dark/light color with 10% white. Also updated some incorrect isTablet checks which really should have been checking shouldShowAllAppsOnSheet(), which includes the all_apps_sheet_for_handheld flag. Demo: https://drive.google.com/file/d/1Ov9Dg3R9YHNfisfxNf97ZIhlDeEA1IWj/view?usp=sharing&resourcekey=0-l_SDpqpS4HtOb10a3b_jNg Other upcoming improvements: interpolator tweaks, colors of things inside the app panel (tabs, private space, search results, etc). Bug: 400827727 Bug: 371343636 Test: Manual Flag: com.android.launcher3.all_apps_blur Change-Id: Ic7063cd822f39a5977715b5477f825bf11e57bdf --- aconfig/launcher.aconfig | 7 ++ quickstep/res/values/config.xml | 1 + .../launcher3/taskbar/TaskbarManager.java | 1 - .../allapps/TaskbarAllAppsSlideInView.java | 30 +++++++- .../overlay/TaskbarOverlayController.java | 71 +++++++++++++++++++ .../uioverrides/states/AllAppsState.java | 21 ++++-- .../quickstep/util/BaseDepthController.java | 8 ++- res/values/attrs.xml | 1 + res/values/styles.xml | 2 + src/com/android/launcher3/DeviceProfile.java | 6 +- .../allapps/ActivityAllAppsContainerView.java | 29 ++++++-- .../allapps/AllAppsTransitionController.java | 3 +- .../touch/AllAppsSwipeController.java | 26 +++++-- .../touch/WorkspaceTouchListener.java | 2 +- .../android/launcher3/views/ScrimView.java | 3 +- .../DeviceProfileDumpTest/phonePortrait.txt | 2 +- .../phonePortrait3Button.txt | 2 +- .../phoneVerticalBar.txt | 2 +- .../phoneVerticalBar3Button.txt | 2 +- 19 files changed, 189 insertions(+), 30 deletions(-) diff --git a/aconfig/launcher.aconfig b/aconfig/launcher.aconfig index 9f505a46f7..f816033904 100644 --- a/aconfig/launcher.aconfig +++ b/aconfig/launcher.aconfig @@ -310,6 +310,13 @@ flag { bug: "374186088" } +flag { + name: "all_apps_blur" + namespace: "launcher" + description: "Content behind the all apps panel in Launcher will be blurred." + bug: "400827727" +} + flag { name: "multiline_search_bar" namespace: "launcher" diff --git a/quickstep/res/values/config.xml b/quickstep/res/values/config.xml index e69fa4d9fe..1ce28cf995 100644 --- a/quickstep/res/values/config.xml +++ b/quickstep/res/values/config.xml @@ -47,6 +47,7 @@ 23 + 34dp + diff --git a/res/values/styles.xml b/res/values/styles.xml index 04421c0ed2..39206d3428 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -40,6 +40,7 @@