mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix another class cast exception
But this is by inspection and, involving a dialog that is no longer posted, could probably never occur.
This commit is contained in:
parent
9211d6b765
commit
0980bcfbe5
1 changed files with 15 additions and 14 deletions
|
@ -181,18 +181,27 @@ public class BoardDelegate extends DelegateBase
|
||||||
|
|
||||||
Dialog dialog;
|
Dialog dialog;
|
||||||
switch ( dlgID ) {
|
switch ( dlgID ) {
|
||||||
|
case DLG_RETRY:
|
||||||
case DLG_OKONLY: {
|
case DLG_OKONLY: {
|
||||||
int title = (Integer)params[0];
|
int title = (Integer)params[0];
|
||||||
String msg = (String)params[1];
|
String msg = (String)params[1];
|
||||||
dialog = ab
|
ab.setTitle( title )
|
||||||
.setTitle( title )
|
|
||||||
.setMessage( msg )
|
.setMessage( msg )
|
||||||
.setPositiveButton( android.R.string.ok, null )
|
.setPositiveButton( android.R.string.ok, null );
|
||||||
.create();
|
if ( DlgID.DLG_RETRY == dlgID ) {
|
||||||
|
lstnr = new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick( DialogInterface dlg,
|
||||||
|
int whichButton ) {
|
||||||
|
handleViaThread( JNICmd.CMD_RESET );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ab.setNegativeButton( R.string.button_retry, lstnr );
|
||||||
|
}
|
||||||
|
dialog = ab.create();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLG_RETRY:
|
|
||||||
case GAME_OVER:
|
case GAME_OVER:
|
||||||
case DLG_CONNSTAT: {
|
case DLG_CONNSTAT: {
|
||||||
GameSummary summary = (GameSummary)params[0];
|
GameSummary summary = (GameSummary)params[0];
|
||||||
|
@ -201,15 +210,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
ab.setTitle( title )
|
ab.setTitle( title )
|
||||||
.setMessage( msg )
|
.setMessage( msg )
|
||||||
.setPositiveButton( android.R.string.ok, null );
|
.setPositiveButton( android.R.string.ok, null );
|
||||||
if ( DlgID.DLG_RETRY == dlgID ) {
|
if ( DlgID.GAME_OVER == dlgID
|
||||||
lstnr = new OnClickListener() {
|
|
||||||
public void onClick( DialogInterface dlg,
|
|
||||||
int whichButton ) {
|
|
||||||
handleViaThread( JNICmd.CMD_RESET );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ab.setNegativeButton( R.string.button_retry, lstnr );
|
|
||||||
} else if ( DlgID.GAME_OVER == dlgID
|
|
||||||
&& rematchSupported( m_activity, true, summary ) ) {
|
&& rematchSupported( m_activity, true, summary ) ) {
|
||||||
lstnr = new OnClickListener() {
|
lstnr = new OnClickListener() {
|
||||||
public void onClick( DialogInterface dlg,
|
public void onClick( DialogInterface dlg,
|
||||||
|
|
Loading…
Reference in a new issue