[Android] Remove artificial limitation to not leave the sdcard directory in the folder browser as well.

This commit is contained in:
Ryan Houdek 2013-06-11 08:25:15 -05:00
parent fcf86f112a
commit 1bea76a6e0
1 changed files with 2 additions and 3 deletions

View File

@ -49,8 +49,8 @@ public class FolderBrowser extends ListActivity {
Collections.sort(dir);
Collections.sort(fls);
dir.addAll(fls);
if (!f.getName().equalsIgnoreCase("sdcard"))
dir.add(0, new GameListItem(getApplicationContext(), "..", "Parent Directory", f.getParent()));
if (!f.getPath().equalsIgnoreCase("/"))
dir.add(0, new GameListItem(getApplicationContext(), "..", "Parent Directory", f.getParent()));
adapter = new GameListAdapter(this,R.layout.folderbrowser,dir);
this.setListAdapter(adapter);
@ -58,7 +58,6 @@ public class FolderBrowser extends ListActivity {
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);
GameListItem o = adapter.getItem(position);
if(o.getData().equalsIgnoreCase("folder")||o.getData().equalsIgnoreCase("parent directory")){