[Android] Video player: Always activate touch delegate

Geoffrey Métais git at videolan.org
Tue Mar 12 14:05:57 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 12 13:38:02 2019 +0100| [1536d2e7a4042764164483fe75753a90b32b3063] | committer: Geoffrey Métais

Video player: Always activate touch delegate

Fix #770

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

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java    | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

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 1eff38f46..149d7863b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -387,14 +387,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
                     + (mSettings.getBoolean("enable_double_tap_seek", true) ? VideoTouchDelegateKt.TOUCH_FLAG_SEEK : 0);
         } else touch = 0;
         mCurrentScreenOrientation = getResources().getConfiguration().orientation;
-        if (touch != 0) {
-            final DisplayMetrics dm = new DisplayMetrics();
-            getWindowManager().getDefaultDisplay().getMetrics(dm);
-            int yRange = Math.min(dm.widthPixels, dm.heightPixels);
-            int xRange = Math.max(dm.widthPixels, dm.heightPixels);
-            final ScreenConfig sc = new ScreenConfig(dm, xRange, yRange, mCurrentScreenOrientation);
-            mTouchDelegate = new VideoTouchDelegate(this, touch, sc, mIsTv);
-        }
+        final DisplayMetrics dm = new DisplayMetrics();
+        getWindowManager().getDefaultDisplay().getMetrics(dm);
+        int yRange = Math.min(dm.widthPixels, dm.heightPixels);
+        int xRange = Math.max(dm.widthPixels, dm.heightPixels);
+        final ScreenConfig sc = new ScreenConfig(dm, xRange, yRange, mCurrentScreenOrientation);
+        mTouchDelegate = new VideoTouchDelegate(this, touch, sc, mIsTv);
         UiTools.setRotationAnimation(this);
         if (savedInstanceState != null) {
             mSavedTime = savedInstanceState.getLong(KEY_TIME);



More information about the Android mailing list