[Android] Filter small move touches on video

Geoffrey Métais git at videolan.org
Thu Apr 9 16:09:01 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr  9 15:19:07 2015 +0200| [d49ba4b895dd76719695b2675250a3c6d38f3568] | committer: Geoffrey Métais

Filter small move touches on video

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=d49ba4b895dd76719695b2675250a3c6d38f3568
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 224ff8f..8e5ce83 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1804,6 +1804,8 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
             // No volume/brightness action if coef < 2 or a secondary display is connected
             //TODO : Volume action when a secondary display is connected
             if (mTouchAction != TOUCH_SEEK && coef > 2 && mPresentation == null) {
+                if (Math.abs(y_changed/mSurfaceYDisplayRange) < 0.05)
+                    return false;
                 mTouchY = event.getRawY();
                 mTouchX = event.getRawX();
                 // Volume (Up or Down - Right side)



More information about the Android mailing list