Skip to content
Snippets Groups Projects
Commit 6c4c0dc5 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Video player: prevent IllegalArgumentException

parent 9aecf984
No related branches found
No related tags found
No related merge requests found
......@@ -134,8 +134,11 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
val xgesturesize = xChanged / screenConfig.metrics.xdpi * 2.54f
val deltaY = ((abs(initTouchY - event.y) / screenConfig.metrics.xdpi + 0.5f) * 2f).coerceAtLeast(1f)
val xTouch = event.x.roundToInt()
val yTouch = event.y.roundToInt()
val (xTouch, yTouch) = try {
Pair(event.x.roundToInt(), event.y.roundToInt())
} catch (e: IllegalArgumentException) {
return false
}
val now = System.currentTimeMillis()
when (event.action) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment