diff options
-rw-r--r-- | res/values/bool.xml | 3 | ||||
-rw-r--r-- | src/com/android/camera/ui/CountDownView.java | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/res/values/bool.xml b/res/values/bool.xml index 464842ab4..4488d70bb 100644 --- a/res/values/bool.xml +++ b/res/values/bool.xml @@ -15,4 +15,5 @@ --> <resources> <bool name="show_action_bar_title">false</bool> -</resources>
\ No newline at end of file + <bool name="force_count_down_sound">false</bool> +</resources> diff --git a/src/com/android/camera/ui/CountDownView.java b/src/com/android/camera/ui/CountDownView.java index 6f4ae8cda..9cfe3f9b0 100644 --- a/src/com/android/camera/ui/CountDownView.java +++ b/src/com/android/camera/ui/CountDownView.java @@ -51,7 +51,11 @@ public class CountDownView extends FrameLayout { super(context, attrs); mCountDownAnim = AnimationUtils.loadAnimation(context, R.anim.count_down_exit); // Load the beeps - mSoundPool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 0); + if (context.getResources().getBoolean(R.bool.force_count_down_sound)) { + mSoundPool = new SoundPool(1, AudioManager.STREAM_SYSTEM_ENFORCED, 0); + } else { + mSoundPool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 0); + } mBeepOnce = mSoundPool.load(context, R.raw.beep_once, 1); mBeepTwice = mSoundPool.load(context, R.raw.beep_twice, 1); } @@ -128,4 +132,4 @@ public class CountDownView extends FrameLayout { } } } -}
\ No newline at end of file +} |