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

Commit 66125a05 authored by Michael Mikhail's avatar Michael Mikhail Committed by Android (Google) Code Review
Browse files

Merge "Update progress data on listening changes" into main

parents 44cc7867 80f9a9ac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ constructor(
                if (field != value) {
                    field = value
                    checkIfPollingNeeded()
                    _data = _data.copy(listening = value)
                }
            }

+12 −0
Original line number Diff line number Diff line
@@ -163,6 +163,18 @@ class SeekBarObserverTest : SysuiTestCase() {
        verify(mockSquigglyProgress).animate = false
    }

    @Test
    fun seekbarNotListeningNotScrubbingPlaying() {
        // WHEN playing
        val isPlaying = true
        val isScrubbing = false
        val data =
            SeekBarViewModel.Progress(true, true, isPlaying, isScrubbing, 3000, 120000, false)
        observer.onChanged(data)
        // THEN progress drawable is not animating
        verify(mockSquigglyProgress).animate = false
    }

    @Test
    fun seekBarPlayingScrubbing() {
        // WHEN playing & scrubbing