[Android] MLProgress: remove condition for progress update

Duncan McNamara git at videolan.org
Tue Aug 30 06:12:47 UTC 2022


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Thu Aug 18 14:38:17 2022 +0200| [89b91b2aebbdc28569774edc5972f95add58589e] | committer: Nicolas Pomepuy

MLProgress: remove condition for progress update

The number of progress updates isn't important enough to limit progress
display updates, and this creates many cases in which progress just
isn't updated at all, so it was removed.

> https://code.videolan.org/videolan/vlc-android/commit/89b91b2aebbdc28569774edc5972f95add58589e
---

 application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt | 2 --
 1 file changed, 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index d9ea77036..4065f9248 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -59,7 +59,6 @@ import org.videolan.vlc.util.*
 import org.videolan.vlc.util.FileUtils
 
 private const val TAG = "VLC/MediaParsingService"
-private const val NOTIFICATION_DELAY = 1000L
 
 class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
 
@@ -362,7 +361,6 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
 
     private suspend fun showNotification(done:Int, scheduled: Int) {
         val currentTime = System.currentTimeMillis()
-        if ((lastNotificationTime == -1L  && done != 0) || currentTime - lastNotificationTime < NOTIFICATION_DELAY) return
         lastNotificationTime = currentTime
         val parsing = (done.toFloat() / scheduled.toFloat() * 100F)
         val discovery = withContext(Dispatchers.Default) {



More information about the Android mailing list