FileDocCategorySizeDatePackage
BaseErrorDialog.javaAPI DocAndroid 1.5 API2375Wed May 06 22:42:00 BST 2009com.android.server.am

BaseErrorDialog

public class BaseErrorDialog extends android.app.AlertDialog

Fields Summary
private android.os.Handler
mHandler
private boolean
mConsuming
Constructors Summary
public BaseErrorDialog(android.content.Context context)

        super(context, com.android.internal.R.style.Theme_Dialog_AppError);

        getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
                WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
        getWindow().setTitle("Error Dialog");
        setIcon(R.drawable.ic_dialog_alert);
    
Methods Summary
public booleandispatchKeyEvent(android.view.KeyEvent event)

        if (mConsuming) {
            //Log.i(TAG, "Consuming: " + event);
            return true;
        }
        //Log.i(TAG, "Dispatching: " + event);
        return super.dispatchKeyEvent(event);
    
public voidonStart()

        super.onStart();
        setEnabled(false);
        mHandler.sendMessageDelayed(mHandler.obtainMessage(0), 1000);
    
private voidsetEnabled(boolean enabled)

        Button b = (Button)findViewById(R.id.button1);
        if (b != null) {
            b.setEnabled(enabled);
        }
        b = (Button)findViewById(R.id.button2);
        if (b != null) {
            b.setEnabled(enabled);
        }