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

Commit e4381ec9 authored by Eric Laurent's avatar Eric Laurent Committed by Andre Eisenbach
Browse files

AudioService: fix BT SCO min volume

Set minimum BT SCO stream volume back to 0 to comply to
Bluetooth audio gateway requirement.

Also fix minimum stream volume when initializing audio policy manager
after a mediaserver crash.

Bug: 24747886
Change-Id: I80c51114d5b10a132b7b10f216bce96323fdc166
parent f789ef7e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ public class AudioService extends IAudioService.Stub {
        0,  // STREAM_MUSIC
        0,  // STREAM_ALARM
        0,  // STREAM_NOTIFICATION
        1,  // STREAM_BLUETOOTH_SCO
        0,  // STREAM_BLUETOOTH_SCO
        0,  // STREAM_SYSTEM_ENFORCED
        0,  // STREAM_DTMF
        0   // STREAM_TTS
@@ -803,7 +803,8 @@ public class AudioService extends IAudioService.Stub {
        int numStreamTypes = AudioSystem.getNumStreamTypes();
        for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
            VolumeStreamState streamState = mStreamStates[streamType];
            AudioSystem.initStreamVolume(streamType, 0, (streamState.mIndexMax + 5) / 10);
            AudioSystem.initStreamVolume(
                streamType, streamState.mIndexMin / 10, streamState.mIndexMax / 10);

            streamState.applyAllVolumes();
        }