[Android] Remove useless buttons visibility updates

Geoffrey Métais git at videolan.org
Thu Mar 10 18:18:10 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 10 18:17:27 2016 +0100| [bf1a0332253f7499f31cd3c340cc45dc77acf7a0] | committer: Geoffrey Métais

Remove useless buttons visibility updates

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java      | 9 +++------
 1 file changed, 3 insertions(+), 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 d93ad7c..98713d3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1542,9 +1542,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
     private void onPlaying() {
         stopLoading();
+        updateNavStatus();
         showOverlay(true);
         setESTracks();
-        updateNavStatus();
     }
 
     private void endReached() {
@@ -2462,10 +2462,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     mRewind.setVisibility(View.VISIBLE);
                 if (mForward != null)
                     mForward.setVisibility(View.VISIBLE);
-                if (mMenuIdx >= 0 && mNavMenu != null)
-                    mNavMenu.setVisibility(View.VISIBLE);
-                if (mService.getMediaListSize() > 1)
-                    mPlaylistToggle.setVisibility(View.VISIBLE);
             }
             dimStatusBar(false);
             mOverlayProgress.setVisibility(View.VISIBLE);
@@ -3114,7 +3110,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     private void updateNavStatus() {
         mIsNavMenu = false;
         mMenuIdx = -1;
-        mNavMenu.setVisibility(View.GONE);
 
         final MediaPlayer.Title[] titles = mService.getTitles();
         if (titles != null) {
@@ -3138,6 +3133,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
         }
         else if (mMenuIdx != -1)
             setESTracks();
+
+        mNavMenu.setVisibility(mMenuIdx >= 0 && mNavMenu != null ? View.VISIBLE : View.GONE);
         supportInvalidateOptionsMenu();
     }
 



More information about the Android mailing list