Code example for Dialog

Methods: cancel

0
            context.registerReceiver(this, filter);
        } 
 
        @Override 
        public void onReceive(Context context, Intent intent) {
            dialog.cancel();
        } 
 
        public void onDismiss(DialogInterface unused) {
            mContext.unregisterReceiver(this);
        } 
    } 
 
    /** 
     * Request a clean shutdown, waiting for subsystems to clean up their 
     * state etc.  Must be called from a Looper thread in which its UI 
     * is shown. 
     * 
     * @param context Context used to display the shutdown progress dialog. 
     * @param reason code to pass to the kernel (e.g. "recovery"), or null. 
     * @param confirm true if user confirmation is needed before shutting down.