From c306dafe441af73711eaeb35221d370f823d5fdc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 8 Sep 2013 16:45:37 -0400 Subject: [PATCH] [Android] Simplify some checks within the the folder browser in regards to checking if a file is hidden or not. Also potentially fixed the case where items in the game list would not remain saved to the config. --- .../dolphinemu/folderbrowser/FolderBrowser.java | 2 +- .../dolphinemu/dolphinemu/gamelist/GameListFragment.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java index 1d5336df31..c8f99d8c3f 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java @@ -64,7 +64,7 @@ public final class FolderBrowser extends Fragment boolean hasExtension = (entryName.lastIndexOf(".") != -1); // Skip hidden folders/files. - if (entryName.charAt(0) != '.') + if (!entry.isHidden()) { if(entry.isDirectory()) { diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java index cdb5c2a745..a31c6c896b 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java @@ -83,13 +83,10 @@ public final class GameListFragment extends Fragment { String entryName = entry.getName(); - if (entryName.charAt(0) != '.') + if (!entry.isHidden() && !entry.isDirectory()) { - if (!entry.isDirectory()) - { - if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.')))) - fls.add(new GameListItem(mMe.getApplicationContext(), entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath())); - } + if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.')))) + fls.add(new GameListItem(mMe, entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath())); } } }