diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index 0c21aa5d3..91690df21 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -772,8 +772,15 @@ public class BoardActivity extends XWActivity int id = item.getItemId(); switch ( id ) { case R.id.board_menu_done: - showNotAgainDlgThen( R.string.not_again_done, - R.string.key_notagain_done, COMMIT_ACTION ); + int nTiles = XwJNI.model_getNumTilesInTray( m_jniGamePtr, + m_view.getCurPlayer() ); + DbgUtils.logf( "getNumTilesInTray=>%d", nTiles ); + if ( XWApp.MAX_TRAY_TILES > nTiles ) { + showNotAgainDlgThen( R.string.not_again_done, + R.string.key_notagain_done, COMMIT_ACTION ); + } else { + dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE ); + } break; case R.id.board_menu_trade_commit: diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java index 795517028..2c5caf68c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java @@ -40,6 +40,7 @@ public class XWApp extends Application { public static final boolean UDP_ENABLED = true; public static final String SMS_PUBLIC_HEADER = "-XW4"; + public static final int MAX_TRAY_TILES = 7; // comtypes.h private static UUID s_UUID = null; private static Boolean s_onEmulator = null;