Loading packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt +6 −5 Original line number Diff line number Diff line Loading @@ -741,10 +741,11 @@ class MediaHierarchyManager @Inject constructor( * Updates the bounds that the view wants to be in at the end of the animation. */ private fun updateTargetState() { if (isCurrentlyInGuidedTransformation() && !isCurrentlyFading()) { var starthost = getHost(previousLocation) var endHost = getHost(desiredLocation) if (isCurrentlyInGuidedTransformation() && !isCurrentlyFading() && starthost != null && endHost != null) { val progress = getTransformationProgress() var endHost = getHost(desiredLocation)!! var starthost = getHost(previousLocation)!! // If either of the hosts are invisible, let's keep them at the other host location to // have a nicer disappear animation. Otherwise the currentBounds of the state might // be undefined Loading @@ -756,8 +757,8 @@ class MediaHierarchyManager @Inject constructor( val newBounds = endHost.currentBounds val previousBounds = starthost.currentBounds targetBounds = interpolateBounds(previousBounds, newBounds, progress) } else { val bounds = getHost(desiredLocation)?.currentBounds ?: return } else if (endHost != null) { val bounds = endHost.currentBounds targetBounds.set(bounds) } } Loading Loading
packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt +6 −5 Original line number Diff line number Diff line Loading @@ -741,10 +741,11 @@ class MediaHierarchyManager @Inject constructor( * Updates the bounds that the view wants to be in at the end of the animation. */ private fun updateTargetState() { if (isCurrentlyInGuidedTransformation() && !isCurrentlyFading()) { var starthost = getHost(previousLocation) var endHost = getHost(desiredLocation) if (isCurrentlyInGuidedTransformation() && !isCurrentlyFading() && starthost != null && endHost != null) { val progress = getTransformationProgress() var endHost = getHost(desiredLocation)!! var starthost = getHost(previousLocation)!! // If either of the hosts are invisible, let's keep them at the other host location to // have a nicer disappear animation. Otherwise the currentBounds of the state might // be undefined Loading @@ -756,8 +757,8 @@ class MediaHierarchyManager @Inject constructor( val newBounds = endHost.currentBounds val previousBounds = starthost.currentBounds targetBounds = interpolateBounds(previousBounds, newBounds, progress) } else { val bounds = getHost(desiredLocation)?.currentBounds ?: return } else if (endHost != null) { val bounds = endHost.currentBounds targetBounds.set(bounds) } } Loading