[Android] Remove uses of data storages

Geoffrey Métais git at videolan.org
Wed Apr 4 18:36:17 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr  3 18:44:12 2018 +0200| [8cc1faa74478098e1f197abe511fd87cfdb7ad00] | committer: Geoffrey Métais

Remove uses of data storages

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

 .../src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java       | 3 +--
 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java   | 6 ------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
index e0e03f21e..861045016 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MediaItemDetailsFragment.java
@@ -52,7 +52,6 @@ import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
 import org.videolan.vlc.gui.video.VideoPlayerActivity;
 import org.videolan.vlc.media.MediaDatabase;
 import org.videolan.vlc.media.MediaUtils;
-import org.videolan.vlc.util.Constants;
 import org.videolan.vlc.util.FileUtils;
 import org.videolan.vlc.util.WorkersKt;
 
@@ -122,7 +121,7 @@ public class MediaItemDetailsFragment extends DetailsFragment implements Playbac
         mMediaWrapper = media;
         setTitle(media.getTitle());
 
-        final List<MediaWrapper> mediaList = (List<MediaWrapper>) VLCApplication.getData(Constants.CURRENT_BROWSER_LIST);
+        final List<MediaWrapper> mediaList = null;
         // Attach your media item details presenter to the row presenter:
         FullWidthDetailsOverviewRowPresenter rowPresenter = new FullWidthDetailsOverviewRowPresenter(new DetailsDescriptionPresenter());
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 20c5f943f..aa64589fc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -65,7 +65,6 @@ import org.videolan.vlc.media.MediaGroup;
 import org.videolan.vlc.media.MediaUtils;
 import org.videolan.vlc.media.PlaylistManager;
 import org.videolan.vlc.util.Constants;
-import org.videolan.vlc.util.Util;
 import org.videolan.vlc.viewmodels.VideosProvider;
 
 import java.util.ArrayList;
@@ -133,10 +132,6 @@ public class VideoGridFragment extends MediaBrowserFragment<VideosProvider> impl
         mSwipeRefreshLayout.setOnRefreshListener(this);
         mDividerItemDecoration = new DividerItemDecoration(requireActivity(), DividerItemDecoration.VERTICAL);
         if (mAdapter.isListMode()) mGridView.addItemDecoration(mDividerItemDecoration);
-        if (savedInstanceState != null) {
-            final List<MediaWrapper> list = (List<MediaWrapper>) VLCApplication.getData("list"+getTitle());
-            if (!Util.isListEmpty(list)) mAdapter.update(list);
-        }
         mGridView.setAdapter(mAdapter);
         mProvider.getDataset().observe(this, new Observer<List<MediaWrapper>>() {
             @Override
@@ -169,7 +164,6 @@ public class VideoGridFragment extends MediaBrowserFragment<VideosProvider> impl
     public void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         outState.putString(Constants.KEY_GROUP, mGroup);
-        VLCApplication.storeData("list"+getTitle(), mAdapter.getAll());
     }
 
     public String getTitle() {



More information about the Android mailing list