@Override
 public Dialog onCreateDialog(Bundle savedInstanceState) {
   int messageRes = getArguments().getInt("messageRes");
   final AlertDialog dialog =
       new AlertDialog.Builder(getActivity())
           .setMessage(messageRes)
           .setCancelable(false)
           .setPositiveButton(
               R.string.wifi_skip_anyway,
               new DialogInterface.OnClickListener() {
                 @Override
                 public void onClick(DialogInterface dialog, int id) {
                   WifiSetupActivity activity = (WifiSetupActivity) getActivity();
                   activity.finish(RESULT_SKIP);
                 }
               })
           .setNegativeButton(
               R.string.wifi_dont_skip,
               new DialogInterface.OnClickListener() {
                 @Override
                 public void onClick(DialogInterface dialog, int id) {}
               })
           .create();
   SetupWizardUtils.applyImmersiveFlags(dialog);
   return dialog;
 }
 public void onNavigationBarCreated(final NavigationBar bar) {
   mNavigationBar = bar;
   bar.setNavigationBarListener(this);
   SetupWizardUtils.setImmersiveMode(this);
 }
 @Override
 protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
   resid = SetupWizardUtils.getTheme(getIntent());
   super.onApplyThemeResource(theme, resid, first);
 }