[Android] Restore DVD menu navigation

Geoffrey Métais git at videolan.org
Wed Feb 21 16:25:31 CET 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 21 11:49:17 2018 +0100| [232c06f8962f4438fd5c95f90d49bb1114a8b910] | committer: Geoffrey Métais

Restore DVD menu navigation

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

 .../videolan/vlc/gui/video/VideoPlayerActivity.java  | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 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 89107ab09..8a3e66169 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1185,7 +1185,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 exitOK();
                 return true;
             case KeyEvent.KEYCODE_DPAD_LEFT:
-                if (!mShowing) {
+                if (mIsNavMenu)
+                    return navigateDvdMenu(keyCode);
+                else if (!mShowing) {
                     if (mFov == 0f)
                         seekDelta(-10000);
                     else
@@ -1193,7 +1195,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     return true;
                 }
             case KeyEvent.KEYCODE_DPAD_RIGHT:
-                if (!mShowing) {
+                if (mIsNavMenu)
+                    return navigateDvdMenu(keyCode);
+                else if (!mShowing) {
                     if (mFov == 0f)
                         seekDelta(10000);
                     else
@@ -1201,7 +1205,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     return true;
                 }
             case KeyEvent.KEYCODE_DPAD_UP:
-                if (event.isCtrlPressed()) {
+                if (mIsNavMenu)
+                    return navigateDvdMenu(keyCode);
+                else if (event.isCtrlPressed()) {
                     volumeUp();
                     return true;
                 } else if (!mShowing) {
@@ -1212,7 +1218,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     return true;
                 }
             case KeyEvent.KEYCODE_DPAD_DOWN:
-                if (event.isCtrlPressed()) {
+                if (mIsNavMenu)
+                    return navigateDvdMenu(keyCode);
+                else if (event.isCtrlPressed()) {
                     volumeDown();
                     return true;
                 } else if (!mShowing && mFov != 0f) {
@@ -1220,7 +1228,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     return true;
                 }
             case KeyEvent.KEYCODE_DPAD_CENTER:
-                if (!mShowing) {
+                if (mIsNavMenu)
+                    return navigateDvdMenu(keyCode);
+                else if (!mShowing) {
                     doPlayPause();
                     return true;
                 }



More information about the Android mailing list