From 20026082a925b527ad2381bf6569da3731e65c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ciche=C5=84ski?= Date: Fri, 23 Jun 2023 00:15:06 +0000 Subject: [PATCH] Set alpha to 1 if not using alpha animation For multi-activity PiP a new task is created, which triggers TO_FRONT transition request that sets the alpha to 0. Since we are using bounds animation in 3 button nav on Home press, we need to reset that alpha to be 1 again. Bug: 286183129 Test: manually, see http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/cQ7FF3EarUUS2W14W9M806 Change-Id: I197de8d24186850e76eb1ec5ee7a713079ff109e --- .../Shell/src/com/android/wm/shell/pip/PipTransition.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java index b8407c465741e..24aaa9b75ebe6 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java @@ -856,6 +856,9 @@ public class PipTransition extends PipTransitionController { final int enterAnimationType = mEnterAnimationType; if (enterAnimationType == ANIM_TYPE_ALPHA) { startTransaction.setAlpha(leash, 0f); + } else { + // set alpha to 1, because for multi-activity PiP it will create a new task with alpha 0 + startTransaction.setAlpha(leash, 1f); } startTransaction.apply();