[Android] Do not update widget while watching a video

Geoffrey Métais git at videolan.org
Fri Jul 7 10:08:10 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jul  7 10:07:37 2017 +0200| [22eb48ef8eeb533025d58555dbccddf8bb3c5bbf] | committer: Geoffrey Métais

Do not update widget while watching a video

> https://code.videolan.org/videolan/vlc-android/commit/22eb48ef8eeb533025d58555dbccddf8bb3c5bbf
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index babce7d1e..4be73023a 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1470,8 +1470,10 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
     }
 
     private void updateWidget() {
-        updateWidgetState();
-        updateWidgetCover();
+        if (!isVideoPlaying()) {
+            updateWidgetState();
+            updateWidgetCover();
+        }
     }
 
     private void updateWidgetState() {



More information about the Android mailing list