From 9a46d0713ad7bcf26af36d89f82de5bec65f6898 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 14 Jun 2015 07:39:10 -0700 Subject: [PATCH] don't post notifications for "moves" about which there's nothing to be said. I think these are admin messages, e.g. "The move you reported is legal", that are not of interest to users. --- .../org/eehouse/android/xw4/GameUtils.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java index 9a5b6bf44..952c17833 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java @@ -1,7 +1,7 @@ /* -*- compile-command: "find-and-ant.sh debug install"; -*- */ /* - * Copyright 2009-2010 by Eric House (xwords@eehouse.org). All - * rights reserved. + * Copyright 2009-2015 by Eric House (xwords@eehouse.org). All rights + * reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -1043,18 +1043,16 @@ public class GameUtils { public static void postMoveNotification( Context context, long rowid, LastMoveInfo lmi ) { - if ( null == lmi ) { - DbgUtils.logf( "postMoveNotification: posting nothing for lack" - + " of lmi" ); - } else { + if ( null != lmi ) { 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 ) ); + String 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 ); + } else { + DbgUtils.logf( "postMoveNotification(): posting nothing for lack" + + " of lmi" ); } }