[Android] Do not ask playback rate when stopped

Geoffrey Métais git at videolan.org
Thu May 17 09:22:11 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 17 09:21:45 2018 +0200| [172d52631ce2ac631a3e3259fcb4d3b796f08b98] | committer: Geoffrey Métais

Do not ask playback rate when stopped

> https://code.videolan.org/videolan/vlc-android/commit/172d52631ce2ac631a3e3259fcb4d3b796f08b98
---

 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 2167fe483..327a28311 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1071,7 +1071,8 @@ public class PlaybackService extends MediaBrowserServiceCompat{
                 }
             }
         }
-        pscb.setState(state, time, playlistManager.getPlayer().getRate());
+        final float rate = state == PlaybackStateCompat.STATE_STOPPED ? 1f : playlistManager.getPlayer().getRate();
+        pscb.setState(state, time, rate);
         final int repeatType = playlistManager.getRepeating();
         if (repeatType != Constants.REPEAT_NONE || hasNext())
             actions |= PlaybackStateCompat.ACTION_SKIP_TO_NEXT;



More information about the Android mailing list