private static void beginShutdownSequence(Context context) { synchronized (sIsStartedGuard) { sIsStarted = true; } // throw up an indeterminate system dialog to indicate radio is // shutting down. ProgressDialog pd = new ProgressDialog(context); pd.setTitle(context.getText(com.android.internal.R.string.power_off)); pd.setMessage(context.getText(com.android.internal.R.string.shutdown_progress)); pd.setIndeterminate(true); pd.setCancelable(false); pd.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); if (!context.getResources().getBoolean(com.android.internal.R.bool.config_sf_slowBlur)) { pd.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND); } pd.show(); // start the thread that initiates shutdown sInstance.mContext = context; sInstance.mHandler = new Handler() {}; sInstance.start(); }