[Android] Filter gesture detection when player is locked

Geoffrey Métais git at videolan.org
Fri Jul 12 14:39:11 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jul 12 11:32:09 2019 +0200| [de5e839520355fbbd7d5dc71a179569e22da20c9] | committer: Geoffrey Métais

Filter gesture detection when player is locked

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

 .../src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt       | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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 77647ce3f..0f339ed2d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
@@ -83,10 +83,12 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
                 return true
             }
             else -> {
-                scaleGestureDetector.onTouchEvent(event)
-                if (scaleGestureDetector.isInProgress) {
-                    touchAction = TOUCH_IGNORE
-                    return true
+                if (!player.isLocked) {
+                    scaleGestureDetector.onTouchEvent(event)
+                    if (scaleGestureDetector.isInProgress) {
+                        touchAction = TOUCH_IGNORE
+                        return true
+                    }
                 }
                 if (touchControls == 0 || player.isLocked) {
                     // locked or swipe disabled, only handle show/hide & ignore all actions



More information about the Android mailing list