From 1fa500b17e79e2d1b678b0dc590f4345195de446 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Tue, 24 Jun 2025 23:38:55 +0000 Subject: [PATCH] Remove ScrimView's drawing controller when resetting All Apps. Previously broken flow: - Open All Apps on inner screen - Drawing controller is set to the AllApps container - Close All Apps (resting state becomes NORMAL) - Fold, unlock - Because we are still in NORMAL, the drawing controller was not updated. Therefore when the ScrimView draws (alongside all other views due to Launcher starting), it asks the inner screen's All Apps container to render its panel on the scrim. The fix is to remove the drawing controller when All Apps resets, thereby avoiding trying to draw on the scrim in the first place. The drawing controller is updated upon the next transition to All Apps, as usual. Bug: 426397329 Test: Manual: https://drive.google.com/file/d/1l9qAIkrgFalcO5DABOEIRX1Po3POYzab/view?usp=sharing&resourcekey=0-ccU6q2fbYE6y87ehIKdbEQ Flag: com.android.launcher3.all_apps_sheet_for_handheld (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:288006fe11bdaec4bd229999619dd7097806620a) Merged-In: I0a4872e6bd668583d08848a8b9c5f0f1389c4f0f Change-Id: I0a4872e6bd668583d08848a8b9c5f0f1389c4f0f --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 1b92cfad32..c97c4edf90 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -116,7 +116,6 @@ public class ActivityAllAppsContainerView OnDeviceProfileChangeListener, PersonalWorkSlidingTabStrip.OnActivePageChangedListener, ScrimView.ScrimDrawingController { - private static final String TAG = "ActivityAllAppsContainerView"; public static final float PULL_MULTIPLIER = .02f; public static final float FLING_VELOCITY_MULTIPLIER = 1200f; @@ -507,6 +506,10 @@ public class ActivityAllAppsContainerView if (isSearching()) { mWorkManager.reset(); } + // Remove the scrim drawing controller to: + // 1) clean up its reference to this class; and + // 2) avoid using the unfolded version of this class for the folded screen or vice-versa + mScrimView.setDrawingController(null); } /**