[Android] Refresh ML on device plugged instead of reloading

Geoffrey Métais git at videolan.org
Wed Nov 22 16:08:09 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov 22 11:33:53 2017 +0100| [535abe2ca2e9b06dd04d9acffdf4992818cef380] | committer: Geoffrey Métais

Refresh ML on device plugged instead of reloading

(cherry picked from commit b4b1c61e10979bc3992c67a70e5e5fd84e6ec72f)

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

 vlc-android/src/org/videolan/vlc/ExternalMonitor.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/ExternalMonitor.java b/vlc-android/src/org/videolan/vlc/ExternalMonitor.java
index 0a8542168..3b6da7a8d 100644
--- a/vlc-android/src/org/videolan/vlc/ExternalMonitor.java
+++ b/vlc-android/src/org/videolan/vlc/ExternalMonitor.java
@@ -175,8 +175,7 @@ public class ExternalMonitor extends BroadcastReceiver {
                         if (VLCApplication.getMLInstance().addDevice(uuid, path, true)) {
                             notifyStorageChanges(path);
                         } else
-                            appCtx.startService(new Intent(MediaParsingService.ACTION_RELOAD, null, appCtx, MediaParsingService.class)
-                                    .putExtra(EXTRA_PATH, path));
+                            LocalBroadcastManager.getInstance(appCtx).sendBroadcast(new Intent(MediaParsingService.ACTION_SERVICE_ENDED));
                     }
                     break;
                 case ACTION_MEDIA_UNMOUNTED:



More information about the Android mailing list