[Android] Always clear preparsing lists

Geoffrey Métais git at videolan.org
Tue Apr 28 14:54:48 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 28 14:36:14 2015 +0200| [aaee7093504e5eeb4b5410970db3af415621595f] | committer: Geoffrey Métais

Always clear preparsing lists

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=aaee7093504e5eeb4b5410970db3af415621595f
---

 .../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java      |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 4f2e8b4..d9c898c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -504,12 +504,12 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
 
             if (mCurrentParsedPosition < mAdapter.getItemCount()) {
                 mMediaBrowser.browse(((MediaWrapper) mAdapter.getItem(mCurrentParsedPosition)).getLocation());
-                directories = new ArrayList<MediaWrapper>();
-                files = new ArrayList<MediaWrapper>();
             } else {
                 mCurrentParsedPosition = -1;
                 mMediaBrowser.release();
             }
+            directories .clear();
+            files.clear();
         }
 
         private String getDescription(int folderCount, int mediaFileCount) {



More information about the Android mailing list