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

Commit c3d79f2f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "sysui: handle single master volume case."

parents 74eb64d3 36007d26
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -216,6 +216,9 @@ public class VolumeDialog implements TunerService.Tunable {
        mExpanded = false;
        mExpandButton = (ImageButton) mDialogView.findViewById(R.id.volume_expand_button);
        mExpandButton.setOnClickListener(mClickExpand);

        mExpandButton.setVisibility(
                AudioSystem.isSingleVolume(mContext) ? View.GONE : View.VISIBLE);
        updateWindowWidthH();
        updateExpandButtonH();

@@ -237,10 +240,12 @@ public class VolumeDialog implements TunerService.Tunable {
                });

        if (mRows.isEmpty()) {
            addRow(AudioManager.STREAM_RING,
                    R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);
            addRow(AudioManager.STREAM_MUSIC,
                    R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true);
            if (!AudioSystem.isSingleVolume(mContext)) {
                addRow(AudioManager.STREAM_RING,
                        R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);

                addRow(AudioManager.STREAM_ALARM,
                        R.drawable.ic_volume_alarm, R.drawable.ic_volume_alarm_mute, false);
                addRow(AudioManager.STREAM_VOICE_CALL,
@@ -249,6 +254,7 @@ public class VolumeDialog implements TunerService.Tunable {
                        R.drawable.ic_volume_bt_sco, R.drawable.ic_volume_bt_sco, false);
                addRow(AudioManager.STREAM_SYSTEM,
                        R.drawable.ic_volume_system, R.drawable.ic_volume_system_mute, false);
            }
        } else {
            addExistingRows();
        }