[Android] Fix device path comparison

Geoffrey Métais git at videolan.org
Wed May 24 15:43:52 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed May 24 15:13:12 2017 +0200| [586d514b0180aa3deba75aace09b5f2afd45f52e] | committer: Geoffrey Métais

Fix device path comparison

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index ca7838b06..887318246 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -176,7 +176,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
 
     private void addDeviceIfNeeded(String path) {
         for (String devicePath : mMedialibrary.getDevices()) {
-            if (path.startsWith(devicePath))
+            if (path.startsWith(Strings.removeFileProtocole(devicePath)))
                 return;
         }
         for (String storagePath : AndroidDevices.getExternalStorageDirectories()) {



More information about the Android mailing list