Loading packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +21 −2 Original line number Diff line number Diff line Loading @@ -508,6 +508,26 @@ class ActivityLaunchAnimator( startAnimation(apps, nonApps, callback) } private fun findRootTaskIfPossible( apps: Array<out RemoteAnimationTarget>? ): RemoteAnimationTarget? { if (apps == null) { return null } var candidate: RemoteAnimationTarget? = null for (it in apps) { if (it.mode == RemoteAnimationTarget.MODE_OPENING) { if (it.taskInfo != null && !it.hasAnimatingParent) { return it } if (candidate == null) { candidate = it } } } return candidate } private fun startAnimation( apps: Array<out RemoteAnimationTarget>?, nonApps: Array<out RemoteAnimationTarget>?, Loading @@ -517,8 +537,7 @@ class ActivityLaunchAnimator( Log.d(TAG, "Remote animation started") } val window = apps?.firstOrNull { it.mode == RemoteAnimationTarget.MODE_OPENING } val window = findRootTaskIfPossible(apps) if (window == null) { Log.i(TAG, "Aborting the animation as no window is opening") removeTimeout() Loading Loading
packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +21 −2 Original line number Diff line number Diff line Loading @@ -508,6 +508,26 @@ class ActivityLaunchAnimator( startAnimation(apps, nonApps, callback) } private fun findRootTaskIfPossible( apps: Array<out RemoteAnimationTarget>? ): RemoteAnimationTarget? { if (apps == null) { return null } var candidate: RemoteAnimationTarget? = null for (it in apps) { if (it.mode == RemoteAnimationTarget.MODE_OPENING) { if (it.taskInfo != null && !it.hasAnimatingParent) { return it } if (candidate == null) { candidate = it } } } return candidate } private fun startAnimation( apps: Array<out RemoteAnimationTarget>?, nonApps: Array<out RemoteAnimationTarget>?, Loading @@ -517,8 +537,7 @@ class ActivityLaunchAnimator( Log.d(TAG, "Remote animation started") } val window = apps?.firstOrNull { it.mode == RemoteAnimationTarget.MODE_OPENING } val window = findRootTaskIfPossible(apps) if (window == null) { Log.i(TAG, "Aborting the animation as no window is opening") removeTimeout() Loading