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
This commit is contained in:
shawnlin
2021-04-14 16:13:17 +08:00
parent 68c58b9ccd
commit 728f5d71cc

View File

@@ -313,12 +313,14 @@ class ActivityLaunchAnimator(context: Context) {
}
context.mainExecutor.execute {
startAnimation(remoteAnimationTargets, iRemoteAnimationFinishedCallback)
startAnimation(remoteAnimationTargets, remoteAnimationNonAppTargets,
iRemoteAnimationFinishedCallback)
}
}
private fun startAnimation(
remoteAnimationTargets: Array<out RemoteAnimationTarget>,
remoteAnimationNonAppTargets: Array<out RemoteAnimationTarget>,
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
}