@Override
 public void onStopTrackingTouch(SeekBar seekBar) {
   // TODO Auto-generated method stub
   switch (seekBar.getId()) {
     case R.id.seekBar_minLevel:
       spe.putInt(SEEKBAR_MIN_LEVEL, seekBar.getProgress());
       while (!spe.commit()) {}
       mainFragment.rebuildSeekbar();
       break;
     case R.id.seekBar_maxLevel:
       spe.putInt(SEEKBAR_MAX_LEVEL, seekBar.getProgress());
       while (!spe.commit()) {}
       mainFragment.rebuildSeekbar();
       break;
     case R.id.seekBar_safetyLevel:
       spe.putInt(SEEKBAR_SAFETY_LEVEL, seekBar.getProgress());
       while (!spe.commit()) {}
       mainFragment.rebuildSeekbar();
       break;
     case R.id.seekBar_VolumeButtonHack:
       spe.putInt(SEEKBAR_VOLUME_BUTTON_HACK, seekBar.getProgress());
       while (!spe.commit()) {}
       Intent service = new Intent(this, MainService.class);
       service.putExtra(MainService.HEADSET_STATUS, MainActivity.TOGGLE_VOLUME_HACK);
       startService(service);
       break;
   }
 }
 @Override
 public void onResume() {
   super.onResume();
   mainFragment.rebuildSeekbar();
 }