Merge remote-tracking branch 'origin/android_branch' into android_branch

This commit is contained in:
Eric House 2012-09-24 07:26:57 -07:00
commit 9a3e43428a
4 changed files with 20 additions and 5 deletions

View file

@ -6,7 +6,7 @@
</head>
<body>
<b>CrossW-SMS 4.4 beta 51 release</b>
<b>CrossW-SMS 4.4 beta 52 release</b>
<p>This is first release of this variant of Crosswords featuring the
ability to play via SMS</p>
@ -21,7 +21,6 @@ ability to play via SMS</p>
<li>New word lookup URLs for Catalan language lists</li>
<li>Display wordlist comment if present</li>
</ul>
<p>Please remember that this is beta software. Please let me know (at

View file

@ -1146,6 +1146,14 @@ public class DBUtils {
}
}
public static boolean gameDBExists( Context context )
{
String name = DBHelper.getDBName();
File sdcardDB = new File( Environment.getExternalStorageDirectory(),
name );
return sdcardDB.exists();
}
private static void copyGameDB( Context context, boolean toSDCard )
{
String name = DBHelper.getDBName();

View file

@ -887,9 +887,11 @@ public class GameUtils {
private static void tellRelayDied( Context context, GameSummary summary,
boolean informNow )
{
DBUtils.addDeceased( context, summary.relayID, summary.seed );
if ( informNow ) {
NetUtils.informOfDeaths( context );
if ( null != summary.relayID ) {
DBUtils.addDeceased( context, summary.relayID, summary.seed );
if ( informNow ) {
NetUtils.informOfDeaths( context );
}
}
}

View file

@ -545,6 +545,12 @@ public class GamesList extends XWListActivity
MenuItem item = menu.findItem( id );
item.setVisible( visible );
}
if ( visible && !DBUtils.gameDBExists( this ) ) {
MenuItem item = menu.findItem( R.id.gamel_menu_loaddb );
item.setVisible( false );
}
return super.onPrepareOptionsMenu( menu );
}