[Android] Fix addDevice not called on startup

Nicolas Pomepuy git at videolan.org
Thu May 7 15:11:36 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May  7 14:52:52 2020 +0200| [fea2af9cc1cb92986a24a18bc682553a2b09288b] | committer: Nicolas Pomepuy

Fix addDevice not called on startup

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index 61786ecc1..f8bb28e18 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -265,6 +265,7 @@ class MediaParsingService : LifecycleService(), DevicesDiscoveryCb {
             val isNewForML =  !medialibrary.isDeviceKnown(if (isMainStorage) "main-storage" else uuid, device, !isMainStorage)
             val isNew = (isMainStorage || (addExternal && knownDevices?.contains(device) != true))
                     && isNewForML
+            medialibrary.addDevice(if (isMainStorage) "main-storage" else uuid, device, !isMainStorage)
             if (!isMainStorage && isNew && preselectedStorages.isEmpty()) showStorageNotification(device)
         }
     }



More information about the Android mailing list