Revert "On some devices a downloaded wordlist shows up twice, once in Internal"

This reverts commit 685971532a.

No way to test this right now....
This commit is contained in:
Eric House 2013-04-18 19:12:49 -07:00
parent e4f52c5678
commit 0d260155ee

View file

@ -128,13 +128,10 @@ public class DictUtils {
// changes? // changes?
} }
private static void tryDir( Context context, HashSet<File> seen, private static void tryDir( Context context, File dir, boolean strict,
File dir, boolean strict,
DictLoc loc, ArrayList<DictAndLoc> al ) DictLoc loc, ArrayList<DictAndLoc> al )
{ {
if ( null != dir && !seen.contains( dir ) ) { if ( null != dir ) {
seen.add( dir );
String[] list = dir.list(); String[] list = dir.list();
if ( null != list ) { if ( null != list ) {
for ( String file : list ) { for ( String file : list ) {
@ -165,12 +162,8 @@ public class DictUtils {
} }
} }
HashSet<File> dirs = new HashSet<File>(); tryDir( context, getSDDir( context ), false, DictLoc.EXTERNAL, al );
dirs.add( context.getFilesDir() ); tryDir( context, getDownloadDir( context ), true,
tryDir( context, dirs, getSDDir( context ), false,
DictLoc.EXTERNAL, al );
tryDir( context, dirs, getDownloadDir( context ), true,
DictLoc.DOWNLOAD, al ); DictLoc.DOWNLOAD, al );
s_dictListCache = s_dictListCache =