[Android] Do not call showNotification too soon
Geoffrey Métais
git at videolan.org
Wed Jun 8 14:41:39 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 8 14:41:02 2016 +0200| [df24c752a6960452f89edbbb10be2d850c15a5e8] | committer: Geoffrey Métais
Do not call showNotification too soon
> https://code.videolan.org/videolan/vlc-android/commit/df24c752a6960452f89edbbb10be2d850c15a5e8
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 36c26d4..b452f70 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -568,7 +568,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
if (update) {
for (Callback callback : mCallbacks)
callback.onMediaEvent(event);
- if (mParsed)
+ if (mParsed && mMediaSession != null)
showNotification();
}
}
@@ -1083,6 +1083,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
}
private final class MediaSessionCallback extends MediaSessionCompat.Callback {
+
@Override
public void onPlay() {
play();
More information about the Android
mailing list