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

Commit 569b5dc4 authored by Joshua Tsuji's avatar Joshua Tsuji
Browse files

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

Test: atest SystemUITests
Change-Id: I13a11a931e013f585f80057fea59b4d6ea531fe3
parent 60cadb23
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>
    ) {
@@ -320,6 +321,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>
@@ -333,6 +335,7 @@ object PhysicsAnimatorTestUtils {
        animatorTestHelpers[animator]?.clearUpdates()
    }

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