Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ee9952b authored by Eric Laurent's avatar Eric Laurent
Browse files

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.
parent d497d876
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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