From e772789514bb675bc68838e105af4a6849a65684 Mon Sep 17 00:00:00 2001 From: Pranav Vashi Date: Thu, 23 Oct 2025 22:53:47 +0530 Subject: [PATCH] SystemUI: SeekBarViewModel: Cancel polling immediately on scrubbing start Signed-off-by: Pranav Vashi --- .../media/controls/ui/viewmodel/SeekBarViewModel.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/SeekBarViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/SeekBarViewModel.kt index 768d3591fcf5b..63c6d6c5e372c 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/SeekBarViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/SeekBarViewModel.kt @@ -191,11 +191,12 @@ constructor( /** Event indicating that the user has started interacting with the seek bar. */ @AnyThread - fun onSeekStarting() = - bgExecutor.execute { - scrubbing = true - isFalseSeek = false - } + fun onSeekStarting() = bgExecutor.execute { + scrubbing = true + isFalseSeek = false + cancel?.run() + cancel = null + } /** * Event indicating that the user has moved the seek bar.