From e7e04fc2bbebef78ba439aa5501128dce1bc09a1 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 16 Sep 2014 07:41:09 -0700 Subject: [PATCH] don't offer to nfc-invite a SMS game since that doesn't work, and DO a relay game since that does. --- .../eehouse/android/xw4/BoardDelegate.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java index 35a13ac3a..8ed193c3e 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardDelegate.java @@ -486,9 +486,20 @@ public class BoardDelegate extends DelegateBase AlertDialog ad = (AlertDialog)dialog; String message = getString( R.string.invite_msg_fmt, m_missing ); + + String ps = null; if ( m_missing > 1 ) { - message += getString( R.string.invite_multiple ); + ps = getString( R.string.invite_multiple ); + } else { + boolean[] avail = NFCUtils.nfcAvail( m_activity ); + if ( avail[1] ) { + ps = getString( R.string.invite_if_nfc ); + } } + if ( null != ps ) { + message += "\n\n" + ps; + } + ad.setMessage( message ); break; } @@ -1651,9 +1662,11 @@ public class BoardDelegate extends DelegateBase String msg = getString( R.string.invite_msg_fmt, nMissingPlayers ); - boolean[] avail = NFCUtils.nfcAvail( m_activity ); - if ( avail[1] ) { - msg += "\n\n" + getString( R.string.invite_if_nfc ); + if ( Action.BT_PICK_ACTION == faction ) { + boolean[] avail = NFCUtils.nfcAvail( m_activity ); + if ( avail[1] ) { + msg += "\n\n" + getString( R.string.invite_if_nfc ); + } } showConfirmThen( msg, R.string.newgame_invite, faction );