[Android] Fix video player overlay focus with DPAD

Geoffrey Métais git at videolan.org
Mon Jul 31 16:17:04 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jul 31 16:11:43 2017 +0200| [e60442d76657e827f17322463ae84cd50886073f] | committer: Geoffrey Métais

Fix video player overlay focus with DPAD

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java        | 7 +------
 1 file changed, 1 insertion(+), 6 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 3e7824d48..128de1000 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -259,7 +259,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     private ImageView mAdvOptions;
     private ImageView mPlaybackSettingPlus;
     private ImageView mPlaybackSettingMinus;
-    private View mObjectFocused;
     protected boolean mEnableCloneMode;
     private boolean mDisplayRemainingTime;
     private int mScreenOrientation;
@@ -2800,10 +2799,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         if (mOverlayTimeout != OVERLAY_INFINITE)
             mHandler.sendMessageDelayed(mHandler.obtainMessage(FADE_OUT), mOverlayTimeout);
         updateOverlayPausePlay();
-        if (mObjectFocused != null)
-            mObjectFocused.requestFocus();
-        else if (getCurrentFocus() == null)
-            mPlayPause.requestFocus();
+        mPlayPause.requestFocus();
     }
 
     private void initOverlay() {
@@ -2856,7 +2852,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             mHandler.removeMessages(FADE_OUT);
             mHandler.removeMessages(SHOW_PROGRESS);
             Log.i(TAG, "remove View!");
-            mObjectFocused = getCurrentFocus();
             UiTools.setViewVisibility(mOverlayTips, View.INVISIBLE);
             if (!fromUser && !mIsLocked) {
                 mOverlayProgress.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));



More information about the Android mailing list