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

Commit e2ad901f authored by Eric Laurent's avatar Eric Laurent
Browse files

Added bluetooth SCO stream to VolumePanel

This is a preliminary change to enable control of BLUETOOTH_SCO stream
volume while in a video chat with a bluetooth headset.
The complete change requires a new icon for BT SCO volume.

Change-Id: I6cd22f0c73d80a9b404b228650b9a30ef144cedc
parent 33bfb66f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
    // List of stream types and their order
    // RING and VOICE_CALL are hidden unless explicitly requested
    private static final int [] STREAM_TYPES = {
        AudioManager.STREAM_BLUETOOTH_SCO,
        AudioManager.STREAM_RING,
        AudioManager.STREAM_VOICE_CALL,
        AudioManager.STREAM_MUSIC,
@@ -137,6 +138,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie

    // These icons need to correspond to the ones above.
    private static final int [] STREAM_ICONS_NORMAL = {
        R.drawable.ic_audio_bt,
        R.drawable.ic_audio_phone,
        R.drawable.ic_audio_phone,
        R.drawable.ic_audio_vol,
@@ -145,6 +147,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie

    // These icons need to correspond to the ones above.
    private static final int [] STREAM_ICONS_MUTED = {
        R.drawable.ic_audio_bt,
        R.drawable.ic_audio_phone,
        R.drawable.ic_audio_phone,
        R.drawable.ic_audio_vol_mute,
@@ -277,6 +280,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
            final int streamType = STREAM_TYPES[i];
            if (streamType == AudioManager.STREAM_RING
                    || streamType == AudioManager.STREAM_VOICE_CALL
                    || streamType == AudioManager.STREAM_BLUETOOTH_SCO
                    || streamType == activeStreamType) {
                continue;
            }