Merge "Initialize StatusBar unfold animation with 1f progress" into tm-dev am: cd1db9f39e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17884335 Change-Id: Iaf4d7a095e41d63db885e532aae9783153972abe Ignore-AOSP-First: this is an automerge Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -52,7 +52,7 @@ class UnfoldMoveFromCenterAnimator @JvmOverloads constructor(
|
|||||||
|
|
||||||
private val animatedViews: MutableList<AnimatedView> = arrayListOf()
|
private val animatedViews: MutableList<AnimatedView> = arrayListOf()
|
||||||
|
|
||||||
private var lastAnimationProgress: Float = 0f
|
private var lastAnimationProgress: Float = 1f
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates display properties in order to calculate the initial position for the views
|
* Updates display properties in order to calculate the initial position for the views
|
||||||
|
|||||||
@@ -60,6 +60,15 @@ class StatusBarMoveFromCenterAnimationControllerTest : SysuiTestCase() {
|
|||||||
assertThat(view.translationX).isZero()
|
assertThat(view.translationX).isZero()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun onStatusBarWidthChangedWithNoTransitionBefore_noTranslation() {
|
||||||
|
controller.onViewsReady(arrayOf(view))
|
||||||
|
|
||||||
|
controller.onStatusBarWidthChanged()
|
||||||
|
|
||||||
|
assertThat(view.translationX).isZero()
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun onTransitionProgress_updatesTranslations() {
|
fun onTransitionProgress_updatesTranslations() {
|
||||||
controller.onViewsReady(arrayOf(view))
|
controller.onViewsReady(arrayOf(view))
|
||||||
|
|||||||
Reference in New Issue
Block a user