somehow new dict-download code is storing some in info DB with

langcode of 0.  Work around that by rebuilding cache entry when that's
seen.
This commit is contained in:
Eric House 2012-10-25 08:03:56 -07:00
parent 6180834ada
commit 6e39466b09

View file

@ -381,6 +381,14 @@ public class DictLangCache {
private static DictInfo getInfo( Context context, DictAndLoc dal )
{
DictInfo info = DBUtils.dictsGetInfo( context, dal.name );
// Tmp test that recovers from problem with new background download code
if ( null != info && 0 == info.langCode ) {
DbgUtils.logf( "getInfo: dropping info for %s b/c lang code wrong",
dal.name );
info = null;
}
if ( null == info ) {
String[] names = { dal.name };
DictUtils.DictPairs pairs = DictUtils.openDicts( context, names );