consider it an error if no dicts found for language. With this change

I can install a game for which there's no dict and when user opens it
he'll get an opportunity to download one.  Might be better to refuse
to install it....
This commit is contained in:
Eric House 2012-01-31 18:47:38 -08:00
parent 5c8488af1b
commit af2fcc76e0

View file

@ -177,7 +177,7 @@ public class GameUtils {
CurGameInfo gi = new CurGameInfo( context );
CommsAddrRec addr = null;
// loadMakeGame, if makinga new game, will add comms as long
// loadMakeGame, if making a new game, will add comms as long
// as DeviceRole.SERVER_STANDALONE != gi.serverRole
int gamePtr = loadMakeGame( context, gi, lockSrc );
String[] dictNames = gi.dictNames();
@ -524,10 +524,13 @@ public class GameUtils {
missingSet = new HashSet<String>( Arrays.asList( dictNames ) );
missingSet.remove( null );
for ( DictUtils.DictAndLoc dal : installed ) {
missingSet.remove( dal.name );
boolean allHere = 0 != missingSet.size(); // need some non-null!
if ( allHere ) {
for ( DictUtils.DictAndLoc dal : installed ) {
missingSet.remove( dal.name );
}
allHere = 0 == missingSet.size();
}
boolean allHere = 0 == missingSet.size();
if ( null != missingNames ) {
missingNames[0] =
missingSet.toArray( new String[missingSet.size()] );