summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-02-19 16:59:35 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-19 16:59:38 +0000
commitd3cfc504d5c05c2bbe77359ec74dfb360ef26f0f (patch)
tree7fe309c11976cb7c6d07b9d0c7d6eb58c9553e5f /services/core
parent3558752ec77f455bbabc86b3178dfb294edf5aff (diff)
parent5e783732b672e7dc27d89cb9fe945bdf8364c39e (diff)
downloadframeworks_base-d3cfc504d5c05c2bbe77359ec74dfb360ef26f0f.zip
frameworks_base-d3cfc504d5c05c2bbe77359ec74dfb360ef26f0f.tar.gz
frameworks_base-d3cfc504d5c05c2bbe77359ec74dfb360ef26f0f.tar.bz2
Merge "AudioService: easier forced camera sound debugging."
Diffstat (limited to 'services/core')
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 4ea62ec..63e3c06 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -581,8 +581,7 @@ public class AudioService extends IAudioService.Stub {
AudioSystem.setErrorCallback(mAudioSystemCallback);
- boolean cameraSoundForced = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_camera_sound_forced);
+ boolean cameraSoundForced = readCameraSoundForced();
mCameraSoundForced = new Boolean(cameraSoundForced);
sendMsg(mAudioHandler,
MSG_SET_FORCE_USE,
@@ -5071,6 +5070,12 @@ public class AudioService extends IAudioService.Stub {
return mMediaFocusControl.getCurrentAudioFocus();
}
+ private boolean readCameraSoundForced() {
+ return SystemProperties.getBoolean("audio.camerasound.force", false) ||
+ mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_camera_sound_forced);
+ }
+
//==========================================================================================
// Device orientation
//==========================================================================================
@@ -5101,8 +5106,7 @@ public class AudioService extends IAudioService.Stub {
null,
0);
- boolean cameraSoundForced = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_camera_sound_forced);
+ boolean cameraSoundForced = readCameraSoundForced();
synchronized (mSettingsLock) {
boolean cameraSoundForcedChanged = false;
synchronized (mCameraSoundForced) {
@@ -5517,6 +5521,7 @@ public class AudioService extends IAudioService.Stub {
pw.print(" mPendingVolumeCommand="); pw.println(mPendingVolumeCommand);
pw.print(" mMusicActiveMs="); pw.println(mMusicActiveMs);
pw.print(" mMcc="); pw.println(mMcc);
+ pw.print(" mCameraSoundForced="); pw.println(mCameraSoundForced);
pw.print(" mHasVibrator="); pw.println(mHasVibrator);
pw.print(" mControllerService="); pw.println(mControllerService);