[Android] Decrease the video touch safety size

Nicolas Pomepuy git at videolan.org
Fri Feb 28 10:58:03 UTC 2025


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Feb 20 09:36:07 2025 +0100| [fd841431a17171c9606c69d501be50bb9b0fa5a0] | committer: Duncan McNamara

Decrease the video touch safety size

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

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

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 230c226fbb..716dbe8889 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
@@ -370,11 +370,13 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
     }
 
     private fun doVerticalTouchAction(y_changed: Float) {
+        if (BuildConfig.DEBUG) Log.d(this::class.java.simpleName, "doVerticalTouchAction $y_changed // ${screenConfig.metrics.widthPixels} // ${3 * screenConfig.metrics.widthPixels / 7f} // $touchX")
         val rightAction = touchX.toInt() > 4 * screenConfig.metrics.widthPixels / 7f
         val leftAction = !rightAction && touchX.toInt() < 3 * screenConfig.metrics.widthPixels / 7f
         if (!leftAction && !rightAction) return
         val audio = touchControls and TOUCH_FLAG_AUDIO_VOLUME != 0
         val brightness = touchControls and TOUCH_FLAG_BRIGHTNESS != 0
+        if (BuildConfig.DEBUG) Log.d(this::class.java.simpleName, "doVerticalTouchAction brightness: $brightness // $leftAction")
         if (!audio && !brightness)
             return
         if (rightAction) {
@@ -472,6 +474,7 @@ class VideoTouchDelegate(private val player: VideoPlayerActivity,
     }
 
     private fun doBrightnessTouch(ychanged: Float) {
+        if (BuildConfig.DEBUG) Log.d(this::class.java.simpleName, "doBrightnessTouch: $initInAllowedBounds")
         if (!initInAllowedBounds) return
         if (touchAction != TOUCH_NONE && touchAction != TOUCH_BRIGHTNESS) return
         if (isFirstBrightnessGesture) initBrightnessTouch()



More information about the Android mailing list