[Android] TV: Restore 'Play All' option in details view

Geoffrey Métais git at videolan.org
Thu May 17 17:15:39 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 17 17:13:49 2018 +0200| [617af1444c2ba653fcd80d02c8b50c585e638368] | committer: Geoffrey Métais

TV: Restore 'Play All' option in details view

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

 .../src/org/videolan/vlc/gui/tv/browser/SortedBrowserFragment.java     | 3 ---
 .../src/org/videolan/vlc/gui/tv/browser/VideoBrowserFragment.java      | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/SortedBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/browser/SortedBrowserFragment.java
index 49d336f60..1d95ba270 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/SortedBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/SortedBrowserFragment.java
@@ -84,7 +84,6 @@ public abstract class SortedBrowserFragment extends BrowseSupportFragment implem
     protected MediaWrapper mItemSelected;
     protected Map<String, ListItem> mMediaItemMap = new ArrayMap<>(), mTempMap;
     protected final SimpleArrayMap<String, Integer> mMediaIndex = new SimpleArrayMap<>();
-    List<MediaWrapper> mVideosList = new ArrayList<>();
     protected final BrowserHandler mHandler = new BrowserHandler(this);
     private BackgroundManager mBackgroundManager;
 
@@ -136,7 +135,6 @@ public abstract class SortedBrowserFragment extends BrowseSupportFragment implem
     @Override
     public void onResume() {
         super.onResume();
-        VLCApplication.storeData(CURRENT_BROWSER_LIST, mVideosList);
         if (!mBackgroundManager.isAttached())
             mBackgroundManager.attachToView(getView());
     }
@@ -209,7 +207,6 @@ public abstract class SortedBrowserFragment extends BrowseSupportFragment implem
                 for (ListItem item : mMediaItemMap.values())
                     Collections.sort(item.mediaList, MediaComparators.byFileType);
                 mHandler.sendEmptyMessage(UPDATE_DISPLAY);
-                VLCApplication.storeData(CURRENT_BROWSER_LIST, mVideosList);
             }
         });
     }
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/VideoBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/browser/VideoBrowserFragment.java
index f33f8941f..a067191be 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/VideoBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/VideoBrowserFragment.java
@@ -37,6 +37,7 @@ import org.videolan.medialibrary.interfaces.MediaUpdatedCb;
 import org.videolan.medialibrary.media.MediaWrapper;
 import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.media.MediaUtils;
+import org.videolan.vlc.util.Util;
 
 @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
 public class VideoBrowserFragment extends SortedBrowserFragment implements MediaUpdatedCb, MediaAddedCb {
@@ -89,6 +90,7 @@ public class VideoBrowserFragment extends SortedBrowserFragment implements Media
     @Override
     public void onPause() {
         super.onPause();
+        if (mVideos != null) VLCApplication.storeData(CURRENT_BROWSER_LIST, Util.arrayToArrayList(mVideos));
         mMediaLibrary.removeMediaUpdatedCb();
         mMediaLibrary.removeMediaAddedCb();
     }



More information about the Android mailing list