From 9211d6b76507a9642910f0615aeb935c366b2998 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 7 Mar 2017 07:08:48 -0800 Subject: [PATCH] fix class cast exception Problem with subverting type checking is compile time errors become runtime... --- .../java/org/eehouse/android/xw4/BoardDelegate.java | 12 +++++++++++- 1 file changed, 11 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 266a62903..3ac2cf66a 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 @@ -181,7 +181,17 @@ public class BoardDelegate extends DelegateBase Dialog dialog; switch ( dlgID ) { - case DLG_OKONLY: + case DLG_OKONLY: { + int title = (Integer)params[0]; + String msg = (String)params[1]; + dialog = ab + .setTitle( title ) + .setMessage( msg ) + .setPositiveButton( android.R.string.ok, null ) + .create(); + } + break; + case DLG_RETRY: case GAME_OVER: case DLG_CONNSTAT: {