Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ce772db authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Suppress unchecked cast warnings because they're upsetting mankoff@."

parents 7fc60391 569b5dc4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -679,6 +679,7 @@ class PhysicsAnimator<T> private constructor (val target: T) {
        internal var instanceConstructor: (Any) -> PhysicsAnimator<*> = ::PhysicsAnimator

        @JvmStatic
        @Suppress("UNCHECKED_CAST")
        fun <T : Any> getInstance(target: T): PhysicsAnimator<T> {
            if (!animators.containsKey(target)) {
                animators[target] = instanceConstructor(target)
+3 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ object PhysicsAnimatorTestUtils {
     */
    @JvmStatic
    @Throws(InterruptedException::class)
    @Suppress("UNCHECKED_CAST")
    fun <T : Any> blockUntilAnimationsEnd(
        properties: FloatPropertyCompat<in T>
    ) {
@@ -327,6 +328,7 @@ object PhysicsAnimatorTestUtils {
    /**
     * Returns all of the values that have ever been reported to update listeners, per property.
     */
    @Suppress("UNCHECKED_CAST")
    fun <T : Any> getAnimationUpdateFrames(animator: PhysicsAnimator<T>):
            UpdateFramesPerProperty<T> {
        return animatorTestHelpers[animator]?.getUpdates() as UpdateFramesPerProperty<T>
@@ -340,6 +342,7 @@ object PhysicsAnimatorTestUtils {
        animatorTestHelpers[animator]?.clearUpdates()
    }

    @Suppress("UNCHECKED_CAST")
    private fun <T> getAnimationTestHelper(animator: PhysicsAnimator<T>): AnimatorTestHelper<T> {
        return animatorTestHelpers[animator] as AnimatorTestHelper<T>
    }