@Override
 public void onCreate(final Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   app = CellHistoryApp.getApp(this);
   prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
   prefFrag = new MyPreferenceFragment();
   getFragmentManager().beginTransaction().replace(android.R.id.content, prefFrag).commit();
   checkValues();
 }
 public void onPause() {
   prefs.unregisterOnSharedPreferenceChangeListener(this);
   super.onPause();
   if (!app.getRecorderCtx().isRunning() && !exit && !preferences) app.notificationShow();
   preferences = false;
 }
 public void onResume() {
   prefs.registerOnSharedPreferenceChangeListener(this);
   super.onResume();
   if (!app.getRecorderCtx().isRunning()) app.getNfyHelper().hide();
 }