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

Commit 792306f6 authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Make FakeAudioRepository default isAffectedByMute to be closer to the...

Merge "Make FakeAudioRepository default isAffectedByMute to be closer to the real repository" into main
parents c8599b4e 879a8edf
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -33,6 +33,12 @@ import kotlinx.coroutines.flow.update

class FakeAudioRepository : AudioRepository {

    private val unMutableStreams =
        setOf(
            AudioManager.STREAM_VOICE_CALL,
            AudioManager.STREAM_ALARM,
        )

    private val mutableMode = MutableStateFlow(AudioManager.MODE_NORMAL)
    override val mode: StateFlow<Int> = mutableMode.asStateFlow()

@@ -73,7 +79,7 @@ class FakeAudioRepository : AudioRepository {
                    volume = 0,
                    minVolume = 0,
                    maxVolume = 10,
                    isAffectedByMute = false,
                    isAffectedByMute = audioStream.value !in unMutableStreams,
                    isAffectedByRingerMode = false,
                    isMuted = false,
                )