Merge "Suppress IndexOutOfBoundsException when cancelling low light animation" into udc-dev am: dcc5cf1712
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23921015 Change-Id: I45bbba004b3b8377c7ab93a7735e326538f51e11 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -111,8 +111,14 @@ class LowLightTransitionCoordinator @Inject constructor() {
|
|||||||
}
|
}
|
||||||
animator.addListener(listener)
|
animator.addListener(listener)
|
||||||
continuation.invokeOnCancellation {
|
continuation.invokeOnCancellation {
|
||||||
animator.removeListener(listener)
|
try {
|
||||||
animator.cancel()
|
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.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user