Merge "StatusBar unfold transition: reset translations when rotating" into sc-v2-dev am: 22d8ff6f68

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16101762

Change-Id: I24b19ea689c514825745f13ad6d24ae447b44759
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarMoveFromCenterAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarMoveFromCenterAnimationController.kt
index 2707fa3..8ef186c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarMoveFromCenterAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarMoveFromCenterAnimationController.kt
@@ -63,5 +63,11 @@
         override fun onTransitionProgress(progress: Float) {
             moveFromCenterAnimator?.onTransitionProgress(progress)
         }
+
+        override fun onTransitionFinished() {
+            // Reset translations when transition is stopped/cancelled
+            // (e.g. the transition could be cancelled mid-way when rotating the screen)
+            moveFromCenterAnimator?.onTransitionProgress(1f)
+        }
     }
 }