Skip to content

Commit

Permalink
Check for MAX_VALUE for default animation.
Browse files Browse the repository at this point in the history
Change-Id: I65c007e74dc4d5f2d9b3469d2d4edf4c542fad72
  • Loading branch information
arriolac committed Mar 31, 2022
1 parent 3f8c1d6 commit 3f85be9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class CameraPositionState(
private fun performAnimateCameraLocked(
map: GoogleMap,
update: CameraUpdate,
durationMs: Int?,
durationMs: Int,
continuation: CancellableContinuation<Unit>
) {
val cancelableCallback = object : GoogleMap.CancelableCallback {
Expand All @@ -253,7 +253,7 @@ class CameraPositionState(
continuation.resume(Unit)
}
}
if (durationMs == null) {
if (durationMs == MAX_VALUE) {
map.animateCamera(update, cancelableCallback)
} else {
map.animateCamera(update, durationMs, cancelableCallback)
Expand Down

0 comments on commit 3f85be9

Please sign in to comment.