From 53a6eb85f6212d05738cdb3c91c1139a9ca2bb9d Mon Sep 17 00:00:00 2001 From: Jordan Demeulenaere Date: Tue, 11 Oct 2022 12:37:50 +0200 Subject: [PATCH] Support LaunchableView in activity launches Bug: 249986783 Test: Manual Change-Id: Ia010fd09689417ac494c554758ba521717c78dc6 --- .../animation/GhostedViewLaunchAnimatorController.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt index eb000ad312d7d..0028d13ffd5e1 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/GhostedViewLaunchAnimatorController.kt @@ -199,6 +199,10 @@ open class GhostedViewLaunchAnimatorController @JvmOverloads constructor( // the content before fading out the background. ghostView = GhostView.addGhost(ghostedView, launchContainer) + // The ghost was just created, so ghostedView is currently invisible. We need to make sure + // that it stays invisible as long as we are animating. + (ghostedView as? LaunchableView)?.setShouldBlockVisibilityChanges(true) + val matrix = ghostView?.animationMatrix ?: Matrix.IDENTITY_MATRIX matrix.getValues(initialGhostViewMatrixValues) @@ -293,6 +297,7 @@ open class GhostedViewLaunchAnimatorController @JvmOverloads constructor( backgroundDrawable?.wrapped?.alpha = startBackgroundAlpha GhostView.removeGhost(ghostedView) + (ghostedView as? LaunchableView)?.setShouldBlockVisibilityChanges(false) launchContainerOverlay.remove(backgroundView) // Make sure that the view is considered VISIBLE by accessibility by first making it