summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-04-23 18:42:39 -0700
committerEric Laurent <elaurent@google.com>2012-04-26 18:36:56 -0700
commit6d5176638c2189595cede38fb92c3e7e8700e221 (patch)
tree27b673ef8d8ca32894e8b62d64e40f52403d63c6 /packages/SystemUI/src/com/android/systemui/power
parentf18222da3cdfd3b052361369b70a4d22396039c1 (diff)
downloadframeworks_base-6d5176638c2189595cede38fb92c3e7e8700e221.zip
frameworks_base-6d5176638c2189595cede38fb92c3e7e8700e221.tar.gz
frameworks_base-6d5176638c2189595cede38fb92c3e7e8700e221.tar.bz2
system and UI sounds volume policy
Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock, camera shutter, DTMF, low battery...): - All system sounds are played over STREAM_SYSTEM stream type. - The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master" stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for tablets which corresponds to the stream whose volume is modified by default by the volume keys. - The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the "master" stream volume ranges from its min to its max. - DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume. - Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master" stream volume except in countries where regulation enforces this sound. In this case its volume is fixed and cannot be muted. - Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is heard while in call. Issue 6344620. Issue 6069229. Issue 6213100. Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/power')
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerUI.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index fe7d5aa..3c30f5d 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -241,7 +241,7 @@ public class PowerUI extends SystemUI {
if (soundUri != null) {
final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
if (sfx != null) {
- sfx.setStreamType(AudioManager.STREAM_NOTIFICATION);
+ sfx.setStreamType(AudioManager.STREAM_SYSTEM);
sfx.play();
}
}