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

Commit 981e89eb authored by LuK1337's avatar LuK1337
Browse files

Use STREAM_RING on non-voice capable devices

* That's what Google does.

Change-Id: Iac88d161eb1dccbbb5c538d5e04d8d1fc43edef2
parent 4a68f3b6
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -237,8 +237,13 @@ public class VolumeDialog implements TunerService.Tunable {
                });

        if (mRows.isEmpty()) {
            if (Util.isVoiceCapable(mContext)) {
                addRow(AudioManager.STREAM_RING,
                        R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);
            } else {
                addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_notification,
                        R.drawable.ic_volume_notification_mute, true);
            }
            addRow(AudioManager.STREAM_MUSIC,
                    R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true);
            addRow(AudioManager.STREAM_ALARM,
@@ -684,7 +689,9 @@ public class VolumeDialog implements TunerService.Tunable {
            }
        }

        if (Util.isVoiceCapable(mContext)) {
            updateNotificationRowH();
        }

        if (mActiveStream != state.activeStream) {
            mActiveStream = state.activeStream;
+7 −4
Original line number Diff line number Diff line
@@ -1146,10 +1146,13 @@ public class AudioService extends IAudioService.Stub {

        mStreamVolumeAlias[AudioSystem.STREAM_DTMF] = dtmfStreamAlias;

        if (mLinkNotificationWithVolume && mVoiceCapable) {
        if (mVoiceCapable) {
            if (mLinkNotificationWithVolume) {
                mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_RING;
            } else {
            mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_NOTIFICATION;
                mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] =
                        AudioSystem.STREAM_NOTIFICATION;
            }
        }

        if (updateVolumes) {