From 3aefa3a5661b462a43f05fc6e520116a5b6921f0 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 16 Jun 2017 19:24:04 -0700 Subject: [PATCH] don't make sound/notify on standalone game moves I'm finding the robot move beeps annoying. If others aren't maybe a preference would be better. We'll see. --- .../main/java/org/eehouse/android/xw4/BoardDelegate.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index 32ed2e816..1b0a841cc 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -1911,7 +1911,12 @@ public class BoardDelegate extends DelegateBase { m_mySIS.words = null == words? null : wordsToArray( words ); nonBlockingDialog( DlgID.DLG_SCORES, expl ); - if ( isVisible() ) { + + // Post a notification if in background, or play sound if not. But + // do nothing for standalone case. + if ( DeviceRole.SERVER_STANDALONE == m_gi.serverRole ) { + // do nothing + } else if ( isVisible() ) { Utils.playNotificationSound( m_activity ); } else { LastMoveInfo lmi = new LastMoveInfo();