[Android] Command reload on cold start

Geoffrey Métais git at videolan.org
Wed May 17 12:04:21 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon May 15 17:13:48 2017 +0200| [719748e5129ad0b6520b9e21f5bd82e8c12195e4] | committer: Geoffrey Métais

Command reload on cold start

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index ad3f8d5..1dac2d8 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -195,7 +195,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                 public void run() {
                     boolean shouldInit = !(new File(MediaParsingService.this.getCacheDir()+Medialibrary.VLC_MEDIA_DB_NAME).exists());
                     mMedialibrary.setup();
-                    if (mMedialibrary.init(MediaParsingService.this)) {
+                    if (mMedialibrary.init(VLCApplication.getAppContext())) {
                         List<String> devices = new ArrayList<>();
                         devices.add(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
                         devices.addAll(AndroidDevices.getExternalStorageDirectories());
@@ -221,6 +221,8 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                             mMedialibrary.discover(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
                         } else if (upgrade)
                             mMedialibrary.forceParserRetry();
+                        else
+                            reload(null);
                     }
                 }
             });



More information about the Android mailing list