[Android] src: Use the sdcard if no directories_root was set

Edward Wang git at videolan.org
Sat Jun 23 06:13:20 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Jun 22 23:58:34 2012 -0400| [d10ce6224743394eefe9a2dbc54313a3fb207525] | committer: Edward Wang

src: Use the sdcard if no directories_root was set

Otherwise, scanning "/" can take forever...

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

 vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
index c5da102..887a393 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
@@ -176,8 +176,9 @@ public class DirectoryAdapter extends BaseAdapter {
 
     public DirectoryAdapter(Context context) {
         AudioDirectoryAdapter_Core(context,
-                PreferenceManager.getDefaultSharedPreferences(context).getString("directories_root", "/")
-                );
+                PreferenceManager.getDefaultSharedPreferences(context)
+                .getString("directories_root", android.os.Environment.getExternalStorageDirectory().getPath())
+        );
     }
 
     public DirectoryAdapter(Context context, String rootDir) {



More information about the Android mailing list