Code example for Dialog

Methods: cancel

            context.registerReceiver(this, filter);
        public void onReceive(Context context, Intent intent) {
        public void onDismiss(DialogInterface unused) {
     * 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.