add debug-only menuitem for marking a game corrupt

This commit is contained in:
Eric House 2020-04-18 14:42:47 -07:00
parent 5fce6d8e26
commit b94ba0fd96
3 changed files with 11 additions and 1 deletions

View file

@ -1793,6 +1793,7 @@ public class GamesListDelegate extends ListDelegateBase
&& (BuildConfig.DEBUG || XWPrefs.getDebugEnabled( m_activity ));
}
Utils.setItemVisible( menu, R.id.games_game_invites, enable );
Utils.setItemVisible( menu, R.id.games_game_markbad, enable );
Utils.setItemVisible( menu, R.id.games_game_netstats, isMultiGame );
enable = !m_launchedGames.contains( rowID );
@ -1989,6 +1990,11 @@ public class GamesListDelegate extends ListDelegateBase
makeOkOnlyBuilder( msg ).show();
break;
// DEBUG only
case R.id.games_game_markbad:
Quarantine.recordOpened( selRowIDs[0] );
break;
default:
handled = false;
}

View file

@ -38,5 +38,7 @@
<item android:id="@+id/games_game_invites"
android:title="@string/board_menu_game_showInvites"
/>
<item android:id="@+id/games_game_markbad"
android:title="@string/list_item_markbad"
/>
</menu>

View file

@ -2306,6 +2306,8 @@
<string name="processing_games">Processing games</string>
<string name="list_item_select">Select</string>
<string name="list_item_deselect">De-select</string>
<!-- Debug-only item for testing corrupt game warnings -->
<string name="list_item_markbad">Mark corrupt</string>
<string name="not_again_dfltname_fmt">You are using the default
player name \"%1$s\". Would you like to personalize with your own
name before you create this game?</string>