mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
tweak unable-to-create-alert alert
And force a DEBUG-only crash so I can perhaps investigate
This commit is contained in:
parent
22ad5aa4e2
commit
b67870118e
1 changed files with 8 additions and 7 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -97,10 +98,10 @@ public class DBAlert extends XWDialogFragment {
|
|||
Dialog dialog = activity.makeDialog( this, mParams );
|
||||
|
||||
if ( null == dialog ) {
|
||||
dialog = LocUtils.makeAlertBuilder( getActivity() )
|
||||
.setTitle( "Stub Alert" )
|
||||
.setMessage( String.format( "Unable to create for %s",
|
||||
getDlgID().toString() ) )
|
||||
Log.e( TAG, "no dialog for %s from %s", getDlgID(), activity );
|
||||
Assert.failDbg();
|
||||
dialog = LocUtils.makeAlertBuilder( activity )
|
||||
.setMessage( "Unable to create " + getDlgID() + " Alert" )
|
||||
.setPositiveButton( "Bummer", null )
|
||||
// .setNegativeButton( "Try now", new OnClickListener() {
|
||||
// @Override
|
||||
|
@ -115,10 +116,10 @@ public class DBAlert extends XWDialogFragment {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
MainActivity activity = (MainActivity)getActivity();
|
||||
if ( null != activity ) {
|
||||
Activity activity = getActivity();
|
||||
if ( null != activity && activity instanceof MainActivity ) {
|
||||
DBAlert newMe = newInstance( getDlgID(), mParams );
|
||||
activity.show( newMe );
|
||||
((MainActivity)activity).show( newMe );
|
||||
dismiss(); // kill myself...
|
||||
} else {
|
||||
Log.d( TAG, "null activity..." );
|
||||
|
|
Loading…
Reference in a new issue