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

Commit 80f9a9ac authored by Michael Mikhail's avatar Michael Mikhail
Browse files

Update progress data on listening changes

Flag: NONE
Bug: 321570646
Test: atest SeekBarObserverTest
Test: Checked UI, no regression happened in seekbar animation.
Change-Id: I40c60edbda9fdd3dda9c8ae39e2888c63eeb6d18
parent ac777cd8
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