[Android] Don't update widget during video playback
Geoffrey Métais
git at videolan.org
Thu Aug 10 10:30:54 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 9 18:29:31 2017 +0200| [c20e908eee0e987fb90129fe977523f702c5d973] | committer: Geoffrey Métais
Don't update widget during video playback
> https://code.videolan.org/videolan/vlc-android/commit/c20e908eee0e987fb90129fe977523f702c5d973
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index ce7a2d5ec..13b230113 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1526,7 +1526,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
}
private void updateWidgetPosition(final float pos) {
- if (!mHasWidget)
+ if (!mHasWidget || isVideoPlaying())
return;
// no more than one widget mUpdateMeta for each 1/50 of the song
long timestamp = System.currentTimeMillis();
@@ -1539,7 +1539,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
private void broadcastMetadata() {
final MediaWrapper media = getCurrentMedia();
- if (media == null || media.getType() != MediaWrapper.TYPE_AUDIO)
+ if (media == null || isVideoPlaying())
return;
sendBroadcast(new Intent("com.android.music.metachanged")
.putExtra("track", media.getTitle())
More information about the Android
mailing list