From 6d5176638c2189595cede38fb92c3e7e8700e221 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 23 Apr 2012 18:42:39 -0700 Subject: 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 --- packages/SystemUI/src/com/android/systemui/power/PowerUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android/systemui/power') 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(); } } -- cgit v1.1