summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/CountDownView.java
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2014-06-24 16:33:05 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-07-09 02:39:45 -0700
commit45dbf2ed679d99ca2bec1b05ca9e533a911da607 (patch)
tree8e10a4809007f25bc47d2159c6caa39e1213630c /src/com/android/camera/ui/CountDownView.java
parent38cc61512bb6615e52bc373986edfadb039c7753 (diff)
downloadandroid_packages_apps_Snap-45dbf2ed679d99ca2bec1b05ca9e533a911da607.tar.gz
android_packages_apps_Snap-45dbf2ed679d99ca2bec1b05ca9e533a911da607.tar.bz2
android_packages_apps_Snap-45dbf2ed679d99ca2bec1b05ca9e533a911da607.zip
Camera2: optionally force count down sound
set count down sound as STREAM_SYSTEM_ENFORCED for carrier compliance Change-Id: Ie60bb4c7059ad8930be2c6650808107dcaaa22a2 CRs-Fixed: 684591
Diffstat (limited to 'src/com/android/camera/ui/CountDownView.java')
-rw-r--r--src/com/android/camera/ui/CountDownView.java8
1 files changed, 6 insertions, 2 deletions
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
+}