[Android] MLProgress: lower delay to show progressBar

Duncan McNamara git at videolan.org
Wed Feb 14 10:45:19 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Feb  7 15:20:51 2024 +0100| [71e55b2334942518b37fa8d9cc7b8f3998b89457] | committer: Nicolas Pomepuy

MLProgress: lower delay to show progressBar

This is linked to commit 89b91b2a in which the delay between updated
from the MediaParsingService was removed. This means that the occasional
null update sent by the medialibrary when changing task will cancel the
task to show the progress bar before it's 1000L delay is done. On low
end devices this delay isn't a problem, but on faster devices the delay
of 1000L causes the progressBar to be canceled before even being shown.

> https://code.videolan.org/videolan/vlc-android/commit/71e55b2334942518b37fa8d9cc7b8f3998b89457
---

 .../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
index f68e695b63..69bf1a5f47 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.kt
@@ -536,7 +536,7 @@ open class AudioPlayerContainerActivity : BaseActivity(), KeycodeListener, Sched
         val visibility = if (show) View.VISIBLE else View.GONE
         if (scanProgressLayout?.visibility == visibility) return
         if (show) {
-            scheduler.scheduleAction(ACTION_DISPLAY_PROGRESSBAR, 1000L, bundleOf("discovery" to discovery))
+            scheduler.scheduleAction(ACTION_DISPLAY_PROGRESSBAR, 100L, bundleOf("discovery" to discovery))
         } else {
             scheduler.cancelAction(ACTION_DISPLAY_PROGRESSBAR)
             scanProgressLayout.setVisibility(visibility)



More information about the Android mailing list