Commit 2bf93658 authored by Jazz Xu's avatar Jazz Xu Committed by Commit Bot

[Lockscreen Media Controls] Fix rough transition when skipping tracks.

This issue is caused by an ActionButtonVisibilityUpdate at
the end of SetIsPlaying - This will make all buttons invisible at the
beginning of a new media session when receiving
MediaSessionInfoChanged, then MediaSessionActionsChanged will update
button visibility immediately after that, which is causing the flashing
issue.

Bug: 1011160

Change-Id: I0f08fc77874641fd44025aae1c29f1cebeacdeb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838385Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jazz Xu <jazzhsu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704297}
parent 4ed28c4a
......@@ -530,10 +530,8 @@ void LockScreenMediaControlsView::MediaSessionChanged(
}
// If |media_session_id_| resumed while waiting, don't hide the controls.
if (hide_controls_timer_->IsRunning() && request_id == media_session_id_) {
if (hide_controls_timer_->IsRunning() && request_id == media_session_id_)
hide_controls_timer_->Stop();
enabled_actions_.clear();
}
// If this session is different than the previous one, wait to see if the
// previous one resumes before hiding the controls.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment