public void updatePrefs() {
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
    playBeep = shouldBeep(prefs, activity);
    if (playBeep && mediaPlayer == null) {
      // The volume on STREAM_SYSTEM is not adjustable, and users found it too loud,
      // so we now play on the music stream.
      activity.setVolumeControlStream(AudioManager.STREAM_MUSIC);
      mediaPlayer = buildMediaPlayer(activity);
    }
  }
Manages beeps and vibrations for {@link CaptureActivity}.

The code for this class was adapted from the ZXing project: http://code.google.com/p/zxing/
OCRTest/src/main/java/edu/sfsu/cs/orange/ocr/BeepManager.java