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

Commit c15a24f4 authored by William Xiao's avatar William Xiao Committed by Automerger Merge Worker
Browse files

Merge "Suppress IndexOutOfBoundsException when cancelling low light animation"...

Merge "Suppress IndexOutOfBoundsException when cancelling low light animation" into udc-dev am: dcc5cf17 am: a0aae013 am: e1239dad

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



Change-Id: I29c21066339ff9650d2798ffaf8fcbad95061322
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9958d631 e1239dad
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -111,8 +111,14 @@ class LowLightTransitionCoordinator @Inject constructor() {
            }
            animator.addListener(listener)
            continuation.invokeOnCancellation {
                try {
                    animator.removeListener(listener)
                    animator.cancel()
                } catch (exception: IndexOutOfBoundsException) {
                    // TODO(b/285666217): remove this try/catch once a proper fix is implemented.
                    // Cancelling the animator can cause an exception since we may be removing a
                    // listener during the cancellation. See b/285666217 for more details.
                }
            }
        }
}