[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
srowen
srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:31:09 UTC 2010
The following commit has been merged in the upstream branch:
commit fc3f3faeabe2b1646b7ea83d4547091fb64187a0
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Fri Apr 23 14:58:14 2010 +0000
Try to respect silent ringer setting
git-svn-id: http://zxing.googlecode.com/svn/trunk@1316 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java
index 3eea85e..068d578 100755
--- a/android/src/com/google/zxing/client/android/CaptureActivity.java
+++ b/android/src/com/google/zxing/client/android/CaptureActivity.java
@@ -251,6 +251,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
playBeep = prefs.getBoolean(PreferencesActivity.KEY_PLAY_BEEP, true);
+ if (playBeep) {
+ // See if sound settings overrides this
+ AudioManager audioService = (AudioManager) getSystemService(AUDIO_SERVICE);
+ if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) {
+ playBeep = false;
+ }
+ }
vibrate = prefs.getBoolean(PreferencesActivity.KEY_VIBRATE, false);
copyToClipboard = prefs.getBoolean(PreferencesActivity.KEY_COPY_TO_CLIPBOARD, true);
initBeepSound();
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list