[Android] Don't pass preparsed media list in Storage browser

Geoffrey Métais git at videolan.org
Thu Mar 9 14:13:16 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar  9 14:11:14 2017 +0100| [5d6d659639a8f78c96c0f4d4a488460c00e10a07] | committer: Geoffrey Métais

Don't pass preparsed media list in Storage browser

It could lead to a class cast exception

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

 vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index d86ffd7..2ba4fcb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -240,7 +240,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
         Fragment next = createFragment();
         Bundle args = new Bundle();
         ArrayList<MediaWrapper> list = mFoldersContentLists != null ? mFoldersContentLists.get(position) : null;
-        if (!Util.isListEmpty(list))
+        if (!Util.isListEmpty(list) && !(this instanceof StorageBrowserFragment))
             VLCApplication.storeData(KEY_MEDIA_LIST, list);
         args.putParcelable(KEY_MEDIA, media);
         next.setArguments(args);



More information about the Android mailing list