[Android] Remove useless calls to onPrepareOptionsMenu

Geoffrey Métais git at videolan.org
Wed Apr 11 11:57:14 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 11 11:55:24 2018 +0200| [4ed4a0712b694143f5370a5e8794cb99bc728917] | committer: Geoffrey Métais

Remove useless calls to onPrepareOptionsMenu

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

 .../src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java    | 1 -
 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java        | 1 -
 vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java    | 6 ------
 3 files changed, 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index f70f3c15c..79e0bdb84 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -288,7 +288,6 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR
 
     @Override
     public void onUpdateFinished(RecyclerView.Adapter adapter) {
-        super.onUpdateFinished(adapter);
         mFastScroller.setRecyclerView(getCurrentRV());
         mSwipeRefreshLayout.setRefreshing(false);
         if (mAlbumsAdapter.isEmpty()) mViewPager.setCurrentItem(1);
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 7bd5dc574..82aa445bb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -492,7 +492,6 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
 
     @Override
     public void onUpdateFinished(RecyclerView.Adapter adapter) {
-        super.onUpdateFinished(adapter);
         if (adapter == getCurrentAdapter()) {
             if (!mMediaLibrary.isWorking())
                 mHandler.sendEmptyMessage(UNSET_REFRESHING);
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
index 9056f4e36..54927e62d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.java
@@ -24,7 +24,6 @@
 package org.videolan.vlc.gui.audio;
 
 import android.support.v7.view.ActionMode;
-import android.support.v7.widget.RecyclerView;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
@@ -176,9 +175,4 @@ public abstract class BaseAudioBrowser extends MediaBrowserFragment<AudioModel>
 
     @Override
     public void onCtxClick(View anchor, final int position, final MediaLibraryItem mediaItem) {}
-
-    @Override
-    public void onUpdateFinished(RecyclerView.Adapter adapter) {
-        if (adapter == getCurrentAdapter()) onPrepareOptionsMenu(getMenu());
-    }
 }



More information about the Android mailing list