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

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

Merge "Ensure seekbar description updates on main thread" into main

parents 1060275b da62514d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ open class SeekBarObserver(private val holder: MediaViewHolder) :
        return DateUtils.formatElapsedTime(milliseconds / DateUtils.SECOND_IN_MILLIS)
    }

    @UiThread
    fun updateContentDescription(
        elapsedTimeDescription: CharSequence,
        durationDescription: CharSequence,
+3 −1
Original line number Diff line number Diff line
@@ -399,7 +399,9 @@ public class MediaControlPanel {
    }

    private void setSeekbarContentDescription(CharSequence elapsedTime, CharSequence duration) {
        mMainExecutor.execute(() -> {
            mSeekBarObserver.updateContentDescription(elapsedTime, duration);
        });
    }

    /**
+6 −4
Original line number Diff line number Diff line
@@ -236,12 +236,14 @@ constructor(
                durationDescription: CharSequence,
            ) {
                if (!SceneContainerFlag.isEnabled) return
                mainExecutor.execute {
                    seekBarObserver.updateContentDescription(
                        elapsedTimeDescription,
                        durationDescription,
                    )
                }
            }
        }

    /**
     * Sets the listening state of the player.