[Android] Fix notification hidden after empty reload
Geoffrey Métais
git at videolan.org
Fri Feb 17 15:34:42 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 17 15:33:40 2017 +0100| [d94610440d6fd69e9f0ca2902301722560fbcbe2] | committer: Geoffrey Métais
Fix notification hidden after empty reload
> https://code.videolan.org/videolan/vlc-android/commit/d94610440d6fd69e9f0ca2902301722560fbcbe2
---
vlc-android/src/org/videolan/vlc/MediaParsingService.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 87c0dc5..308f37c 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -75,6 +75,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
filter.addAction(ACTION_RESUME_SCAN);
registerReceiver(mReceiver, filter);
mLastNotificationTime = System.currentTimeMillis();
+ mMedialibrary.addDeviceDiscoveryCb(MediaParsingService.this);
switch (intent.getAction()) {
case ACTION_INIT:
setupMedialibrary(intent.getBooleanExtra(StartActivity.EXTRA_UPGRADE, false));
@@ -90,19 +91,16 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
}
private void discover(String path) {
- mMedialibrary.addDeviceDiscoveryCb(MediaParsingService.this);
mMedialibrary.discover(path);
}
private void reload() {
if (mReload > 0)
return;
- mMedialibrary.addDeviceDiscoveryCb(MediaParsingService.this);
mMedialibrary.reload();
}
private void setupMedialibrary(final boolean upgrade) {
- mMedialibrary.addDeviceDiscoveryCb(MediaParsingService.this);
if (mMedialibrary.isInitiated())
mMedialibrary.resumeBackgroundOperations();
else
@@ -222,9 +220,6 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
public void onReloadCompleted(String entryPoint) {
if (TextUtils.isEmpty(entryPoint))
--mReload;
- if (mParsing == 0) {
- stopSelf();
- }
}
@Override
More information about the Android
mailing list