From 728f5d71cca1a1bbe92c1c7e3678b36f7364ed2b Mon Sep 17 00:00:00 2001 From: shawnlin Date: Wed, 14 Apr 2021 16:13:17 +0800 Subject: [PATCH] Fixed attaching nav to app not working for notification case Find the nav target from non-app targets instead of app targets. Bug: 185303414 Test: manual - click notification item to launch app Change-Id: I9ab1bbe874cf55726db4efe6aabe3e360596171f --- .../android/systemui/animation/ActivityLaunchAnimator.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index da78a7c24d0fd..3363f8ea808cb 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -313,12 +313,14 @@ class ActivityLaunchAnimator(context: Context) { } context.mainExecutor.execute { - startAnimation(remoteAnimationTargets, iRemoteAnimationFinishedCallback) + startAnimation(remoteAnimationTargets, remoteAnimationNonAppTargets, + iRemoteAnimationFinishedCallback) } } private fun startAnimation( remoteAnimationTargets: Array, + remoteAnimationNonAppTargets: Array, iCallback: IRemoteAnimationFinishedCallback ) { val window = remoteAnimationTargets.firstOrNull { @@ -332,7 +334,7 @@ class ActivityLaunchAnimator(context: Context) { return } - val navigationBar = remoteAnimationTargets.firstOrNull { + val navigationBar = remoteAnimationNonAppTargets.firstOrNull { it.windowType == WindowManager.LayoutParams.TYPE_NAVIGATION_BAR }