[Android] Exit touch action after performing seek

Geoffrey Métais git at videolan.org
Thu Mar 12 10:16:22 CET 2020


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 12 10:15:57 2020 +0100| [a6154df80b811b4b9c71930b08e3fd07079390dd] | committer: Geoffrey Métais

Exit touch action after performing seek

See #1175

> https://code.videolan.org/videolan/vlc-android/commit/a6154df80b811b4b9c71930b08e3fd07079390dd
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
index d038e69ab..ced025667 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
@@ -195,12 +195,16 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
                         // Mouse events for the core
                         player.sendMouseEvent(MotionEvent.ACTION_UP, xTouch, yTouch)
                         // Seek
-                        if (touchAction == TOUCH_SEEK) doSeekTouch(deltaY.roundToInt(), xgesturesize, true)
                         touchX = -1f
                         touchY = -1f
 
                         handler.removeCallbacksAndMessages(null)
 
+                        if (touchAction == TOUCH_SEEK) {
+                            doSeekTouch(deltaY.roundToInt(), xgesturesize, true)
+                            return true
+                        }
+
                         if (now - touchDownMs > ViewConfiguration.getDoubleTapTimeout()) {
                             //it was not a tap
                             numberOfTaps = 0



More information about the Android mailing list