From b94ba0fd96b1acf56a2397dfb4de1c97848e47d0 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 18 Apr 2020 14:42:47 -0700 Subject: [PATCH] add debug-only menuitem for marking a game corrupt --- .../java/org/eehouse/android/xw4/GamesListDelegate.java | 6 ++++++ .../android/app/src/main/res/menu/games_list_game_menu.xml | 4 +++- xwords4/android/app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 11caabfe1..011186475 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -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; } diff --git a/xwords4/android/app/src/main/res/menu/games_list_game_menu.xml b/xwords4/android/app/src/main/res/menu/games_list_game_menu.xml index 97bf85a39..6bf76aec9 100644 --- a/xwords4/android/app/src/main/res/menu/games_list_game_menu.xml +++ b/xwords4/android/app/src/main/res/menu/games_list_game_menu.xml @@ -38,5 +38,7 @@ - + diff --git a/xwords4/android/app/src/main/res/values/strings.xml b/xwords4/android/app/src/main/res/values/strings.xml index 8d3879962..314b2867a 100644 --- a/xwords4/android/app/src/main/res/values/strings.xml +++ b/xwords4/android/app/src/main/res/values/strings.xml @@ -2306,6 +2306,8 @@ Processing games Select De-select + + Mark corrupt You are using the default player name \"%1$s\". Would you like to personalize with your own name before you create this game?