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

Commit bbedb4d2 authored by Wenyu Zhang's avatar Wenyu Zhang Committed by Android (Google) Code Review
Browse files

Merge "audio: Clean up only_show_media_stream_slider_in_single_volume_mode flag" into main

parents b8072c5b b4a39e46
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1767,16 +1767,6 @@ flag {
  }
}

flag {
   name: "only_show_media_stream_slider_in_single_volume_mode"
   namespace: "systemui"
   description: "When the device is in single volume mode, only show media stream slider and hide all other stream (e.g. call, notification, alarm, etc) sliders in volume panel"
   bug: "373729625"
   metadata {
       purpose: PURPOSE_BUGFIX
   }
}

flag {
   name: "hide_ringer_button_in_single_volume_mode"
   namespace: "systemui"
+0 −3
Original line number Diff line number Diff line
@@ -17,12 +17,10 @@
package com.android.systemui.volume.panel.component.volume.domain.interactor

import android.media.AudioManager
import android.platform.test.annotations.EnableFlags
import android.testing.TestableLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.settingslib.volume.shared.model.AudioStream
import com.android.systemui.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.Kosmos
@@ -95,7 +93,6 @@ class AudioSlidersInteractorTest : SysuiTestCase() {


    @Test
    @EnableFlags(Flags.FLAG_ONLY_SHOW_MEDIA_STREAM_SLIDER_IN_SINGLE_VOLUME_MODE)
    fun shouldAddMusicStreamOnly_singleVolumeMode() =
        with(kosmos) {
            testScope.runTest {
+2 −5
Original line number Diff line number Diff line
@@ -95,13 +95,10 @@ constructor(
    }

    private fun MutableList<SliderType>.addStream(stream: Int) {
        // Hide other streams except STREAM_MUSIC if the isSingleVolume mode is on. This makes sure
        // Hide other streams except STREAM_MUSIC in single volume mode to makes sure
        // the volume slider in volume panel is consistent with the volume slider inside system
        // settings app.
        if (
            Flags.onlyShowMediaStreamSliderInSingleVolumeMode() &&
                audioSystemRepository.isSingleVolume &&
                stream != AudioManager.STREAM_MUSIC
        if (audioSystemRepository.isSingleVolume && stream != AudioManager.STREAM_MUSIC
        ) {
            return
        }