add haveDict()

This commit is contained in:
Eric House 2012-10-17 07:10:08 -07:00
parent a8c77bca88
commit 04f51bd392

View file

@ -121,6 +121,19 @@ public class DictLangCache {
return result;
}
public static boolean haveDict( Context context, int code, String name )
{
boolean found = false;
DictInfo[] infos = getInfosHaveLang( context, code );
for ( DictInfo info : infos ) {
if ( info.name.equals( name ) ) {
found = true;
break;
}
}
return found;
}
private static String[] getHaveLang( Context context, int code,
Comparator<DictInfo> comp,
boolean withCounts )