don't post notification if there's no explanation to be offered. I've

been seeing ghost notifications where there should be none; this will
fix that, but I need to observe that it doesn't remove notifications
that are needed.
This commit is contained in:
Eric House 2015-03-03 07:05:20 -08:00
parent 4cd75abaa9
commit e3b5848d5d

View file

@ -1031,14 +1031,19 @@ public class GameUtils {
public static void postMoveNotification( Context context, long rowid,
LastMoveInfo lmi )
{
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
String msg = "";
if ( null != lmi ) {
msg = lmi.format( context );
if ( null == lmi ) {
DbgUtils.logf( "postMoveNotification: posting nothing for lack"
+ " of lmi" );
} else {
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
String msg = "";
if ( null != lmi ) {
msg = lmi.format( context );
}
String title = LocUtils.getString( context, R.string.notify_title_fmt,
getName( context, rowid ) );
Utils.postNotification( context, intent, title, msg, (int)rowid );
}
String title = LocUtils.getString( context, R.string.notify_title_fmt,
getName( context, rowid ) );
Utils.postNotification( context, intent, title, msg, (int)rowid );
}
private static void tellDied( Context context, GameLock lock,