From 57deacba44cd462df33c96bdde715726c4bb0223 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Tue, 2 Jul 2024 16:45:46 -0700 Subject: Fix black veil when splitting from side in some conditions This CL explicitly sets alpha to 0 or 1 when SplitDecorManager does an immediate visibility change. Previously, the layer visibility was being set, but not the alpha, so in some situations the alpha was not updated properly and the veil was not visible during the transition. Setting the alpha explicitly fixes the problem. Fixes: 343859372 Test: Manually verified that the veil is visible in the buggy repro condition. Flag: EXEMPT bugfix Change-Id: I439d478ad390da301b7c8faca97b272b7e727a24 (cherry picked from commit 510a5a51f958e5c2bdb31873a54b0ef213638084) --- .../Shell/src/com/android/wm/shell/common/split/SplitDecorManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitDecorManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitDecorManager.java index 3de8004b57fc..446d677bbdd4 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitDecorManager.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitDecorManager.java @@ -269,7 +269,9 @@ public class SplitDecorManager extends WindowlessWindowManager { if (update) { if (immediately) { + t.setAlpha(mBackgroundLeash, showVeil ? 1f : 0f); t.setVisibility(mBackgroundLeash, showVeil); + t.setAlpha(mIconLeash, showVeil ? 1f : 0f); t.setVisibility(mIconLeash, showVeil); } else { startFadeAnimation(showVeil, false, null); -- cgit v1.2.3-59-g8ed1b