[Android] VideoControls: fix hud hidden after scale gesture

Duncan McNamara git at videolan.org
Wed Jan 19 09:23:18 UTC 2022


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Jan 18 18:41:57 2022 +0100| [7aa8b715a301202c356fd77e76b39077b30cffee] | committer: Duncan McNamara

VideoControls: fix hud hidden after scale gesture

Fixes #2328

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

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
index 0a62a1799..addaadca1 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoTouchDelegate.kt
@@ -42,7 +42,6 @@ private const val TOUCH_BRIGHTNESS = 2
 private const val TOUCH_MOVE = 3
 private const val TOUCH_TAP_SEEK = 4
 private const val TOUCH_IGNORE = 5
-private const val TOUCH_SWIPE_SEEK = 6
 
 private const val MIN_FOV = 20f
 private const val MAX_FOV = 150f
@@ -311,12 +310,9 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
     private val TAG = this::class.java.name
 
     private fun doSeekTouch(coef: Int, gesturesize: Float, seek: Boolean) {
-        Log.d(TAG, "doSeekTouch: ${touchControls and TOUCH_FLAG_SWIPE_SEEK}")
         if (touchControls and TOUCH_FLAG_SWIPE_SEEK != 0) {
             var coef = coef
             if (coef == 0) coef = 1
-            Log.d(TAG, "doSeekTouch: coef: $coef")
-            Log.d(TAG, "doSeekTouch: abs(gesturesize): ${abs(gesturesize)}")
             // No seek action if coef > 0.5 and gesturesize < 1cm
             if (abs(gesturesize) < 1 || !player.service!!.isSeekable) return
 
@@ -437,6 +433,7 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
                 } else if (!grow && player.currentScaleType == MediaPlayer.ScaleType.SURFACE_FIT_SCREEN) {
                     player.setVideoScale(MediaPlayer.ScaleType.SURFACE_BEST_FIT)
                 }
+                touchAction = TOUCH_NONE
             }
         }
     }



More information about the Android mailing list