[Android] Init updates tasks with asList too

Geoffrey Métais git at videolan.org
Fri Feb 27 16:23:10 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 27 15:18:38 2015 +0100| [5b3aca4967fbe169a4a1c7a296cabe515f43b1e0] | committer: Geoffrey Métais

Init updates tasks with asList too

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

 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java    |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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 77fbfd6..4ebb132 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -538,11 +538,8 @@ public class AudioBrowserFragment extends BrowserFragment implements SwipeRefres
             mHandler.sendEmptyMessageDelayed(MSG_LOADING, 300);
 
             ExecutorService tpe = Executors.newSingleThreadExecutor();
-            ArrayList<Runnable> tasks = new ArrayList<Runnable>();
-            tasks.add(updateArtists);
-            tasks.add(updateAlbums);
-            tasks.add(updateSongs);
-            tasks.add(updateGenres);
+            List<Runnable> tasks = Arrays.asList(updateArtists, updateAlbums, updateSongs, updateGenres);
+
             //process the visible list first
             tasks.add(0, tasks.remove(mViewPager.getCurrentItem()));
             tasks.add(new Runnable() {



More information about the Android mailing list