[Android] Exit ML service if no action is required
Geoffrey Métais
git at videolan.org
Thu Dec 7 16:55:35 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec 7 16:40:34 2017 +0100| [e913a3e5d9117731ff7294a2aaa4142a331d7348] | committer: Geoffrey Métais
Exit ML service if no action is required
> https://code.videolan.org/videolan/vlc-android/commit/e913a3e5d9117731ff7294a2aaa4142a331d7348
---
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 b9bbdb1df..8dd8ef22a 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -120,8 +120,10 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- if (intent == null)
+ if (intent == null) {
+ exitCommand();
return START_NOT_STICKY;
+ }
synchronized (MediaParsingService.this) {
// Set 1s delay before displaying scan icon
// Except for Android 8+ which expects startForeground immediately
More information about the Android
mailing list