summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-01-06 15:46:36 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-06 15:46:36 -0800
commit7944704e6c4cc10105838b78d3d8403bf66a066b (patch)
treeae87da85e5c8f7753d69ec8698a87138dcd0e6d0 /core
parenta476eed6b291d06f5e571597b928b7b2f0b3f257 (diff)
parentb7feb1c91f1053adb1815bc522c43db3f2c3f598 (diff)
downloadframeworks_base-7944704e6c4cc10105838b78d3d8403bf66a066b.zip
frameworks_base-7944704e6c4cc10105838b78d3d8403bf66a066b.tar.gz
frameworks_base-7944704e6c4cc10105838b78d3d8403bf66a066b.tar.bz2
Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1
Diffstat (limited to 'core')
-rw-r--r--core/java/android/hardware/CameraSound.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/hardware/CameraSound.java b/core/java/android/hardware/CameraSound.java
index 32de0cd..dc97ff0 100644
--- a/core/java/android/hardware/CameraSound.java
+++ b/core/java/android/hardware/CameraSound.java
@@ -110,7 +110,6 @@ public class CameraSound {
private static class CameraSoundPlayer implements Runnable {
private int mSoundId;
- private int mAudioStreamType;
private MediaPlayer mPlayer;
private Thread mThread;
private boolean mExit;
@@ -147,7 +146,7 @@ public class CameraSound {
}
mPlayer = new MediaPlayer();
try {
- mPlayer.setAudioStreamType(mAudioStreamType);
+ mPlayer.setAudioStreamType(AudioManager.STREAM_SYSTEM_ENFORCED);
mPlayer.setDataSource(soundFilePath);
mPlayer.setLooping(false);
mPlayer.prepare();
@@ -179,11 +178,6 @@ public class CameraSound {
public CameraSoundPlayer(int soundId) {
mSoundId = soundId;
- if (SystemProperties.get("ro.camera.sound.forced", "0").equals("0")) {
- mAudioStreamType = AudioManager.STREAM_MUSIC;
- } else {
- mAudioStreamType = AudioManager.STREAM_SYSTEM_ENFORCED;
- }
}
public void play() {