[Android] Update medialibrary hash

Nicolas Pomepuy git at videolan.org
Thu Nov 26 12:57:29 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 26 11:36:11 2020 +0100| [8512cc9cd330c1284634b6b27c22038373068a17] | committer: Nicolas Pomepuy

Update medialibrary hash

> https://code.videolan.org/videolan/vlc-android/commit/8512cc9cd330c1284634b6b27c22038373068a17
---

 application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt     | 4 +++-
 application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt | 1 +
 application/vlc-android/src/org/videolan/vlc/StoragesMonitor.kt     | 3 +++
 buildsystem/compile-medialibrary.sh                                 | 2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt b/application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
index 1392555b6..6c02165e5 100644
--- a/application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
+++ b/application/vlc-android/src/org/videolan/vlc/ExternalMonitor.kt
@@ -32,7 +32,7 @@ import android.content.IntentFilter
 import android.hardware.usb.UsbDevice
 import android.hardware.usb.UsbManager
 import android.net.Uri
-import androidx.core.content.ContextCompat
+import android.util.Log
 import androidx.core.content.getSystemService
 import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.LifecycleObserver
@@ -70,6 +70,7 @@ object ExternalMonitor : BroadcastReceiver(), LifecycleObserver, CoroutineScope
         for (action in channel) when (action){
             is MediaMounted -> {
                 if (action.uuid.isEmpty()) return at actor
+                Log.i("ExternalMonitor", "Storage management: mount: ${action.uuid} - ${action.path}")
                 val isNew = ctx.getFromMl {
                     val isNewForMl = !isDeviceKnown(action.uuid, action.path, true)
                     addDevice(action.uuid, action.path, true)
@@ -79,6 +80,7 @@ object ExternalMonitor : BroadcastReceiver(), LifecycleObserver, CoroutineScope
             }
             is MediaUnmounted -> {
                 delay(100L)
+                Log.i("ExternalMonitor", "Storage management: unmount: ${action.uuid} - ${action.path}")
                 Medialibrary.getInstance().removeDevice(action.uuid, action.path)
                 storageChannel.safeOffer(action)
             }
diff --git a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index 73e1aa57a..5f580365f 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -331,6 +331,7 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
         }
         withContext(Dispatchers.IO) { for (device in missingDevices) {
             val uri = device.toUri()
+            Log.i("MediaParsingService", "Storage management: storage missing: ${uri.path}")
             medialibrary.removeDevice(uri.lastPathSegment, uri.path)
         } }
         serviceLock = false
diff --git a/application/vlc-android/src/org/videolan/vlc/StoragesMonitor.kt b/application/vlc-android/src/org/videolan/vlc/StoragesMonitor.kt
index 4235e43ae..e8e599fdf 100644
--- a/application/vlc-android/src/org/videolan/vlc/StoragesMonitor.kt
+++ b/application/vlc-android/src/org/videolan/vlc/StoragesMonitor.kt
@@ -6,6 +6,7 @@ import android.content.Context
 import android.content.Intent
 import android.content.pm.PackageManager
 import android.net.Uri
+import android.util.Log
 import kotlinx.coroutines.channels.Channel
 import kotlinx.coroutines.channels.actor
 import kotlinx.coroutines.delay
@@ -33,6 +34,7 @@ class StoragesMonitor : BroadcastReceiver() {
         for (action in channel) when (action){
             is Mount -> {
                 if (action.uuid.isEmpty()) return at actor
+                Log.i("StoragesMonitor", "Storage management: mount: ${action.uuid} - ${action.path}")
                 if (action.path.scanAllowed()) {
                     val isNew = action.ctx.getFromMl {
                         val isNewForML = !isDeviceKnown(action.uuid, action.path, true)
@@ -52,6 +54,7 @@ class StoragesMonitor : BroadcastReceiver() {
                 }
             }
             is Unmount -> {
+                Log.i("StoragesMonitor", "Storage management: unmount: ${action.uuid} - ${action.path}")
                 delay(100L)
                 Medialibrary.getInstance().removeDevice(action.uuid, action.path)
             }
diff --git a/buildsystem/compile-medialibrary.sh b/buildsystem/compile-medialibrary.sh
index ae3ab1096..8b57a26f9 100755
--- a/buildsystem/compile-medialibrary.sh
+++ b/buildsystem/compile-medialibrary.sh
@@ -4,7 +4,7 @@
 # ARGUMENTS #
 #############
 
-MEDIALIBRARY_HASH=1755e7abfa80f53129050c9d39f5494025a9a854
+MEDIALIBRARY_HASH=8bb0bfb4b4db9587bead04dd69c930a4f155fcda
 
 while [ $# -gt 0 ]; do
   case $1 in



More information about the Android mailing list