Fix issue 2076322: AudioService, too many stream volume steps.

MAX_STREAM_VOLUME[] now contains the maximum valid index instead of the number of indexes for all stream types.
This commit is contained in:
Eric Laurent
2009-08-25 06:30:59 -07:00
parent 3429d3439c
commit 1d8a95f141

View File

@@ -144,16 +144,16 @@ public class AudioService extends IAudioService.Stub {
/** @hide Maximum volume index values for audio streams */
private int[] MAX_STREAM_VOLUME = new int[] {
6, // STREAM_VOICE_CALL
8, // STREAM_SYSTEM
8, // STREAM_RING
16, // STREAM_MUSIC
8, // STREAM_ALARM
8, // STREAM_NOTIFICATION
16, // STREAM_BLUETOOTH_SCO
8, // STREAM_SYSTEM_ENFORCED
16, // STREAM_DTMF
16 // STREAM_TTS
5, // STREAM_VOICE_CALL
7, // STREAM_SYSTEM
7, // STREAM_RING
15, // STREAM_MUSIC
7, // STREAM_ALARM
7, // STREAM_NOTIFICATION
15, // STREAM_BLUETOOTH_SCO
7, // STREAM_SYSTEM_ENFORCED
15, // STREAM_DTMF
15 // STREAM_TTS
};
/* STREAM_VOLUME_ALIAS[] indicates for each stream if it uses the volume settings
* of another stream: This avoids multiplying the volume settings for hidden