[Android] Avoid redundant calls on audio focus lost

Geoffrey Métais git at videolan.org
Wed Nov 15 15:48:47 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov 15 14:45:02 2017 +0100| [03e8a4c94fa2f1801f5827435d1e2845ba4f09fe] | committer: Geoffrey Métais

Avoid redundant calls on audio focus lost

(cherry picked from commit c3502e93b6ac8e93cafb33c0f3fe097cfa001ef0)

> https://code.videolan.org/videolan/vlc-android/commit/03e8a4c94fa2f1801f5827435d1e2845ba4f09fe
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index b410643d0..7a73c7328 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -443,6 +443,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
             }
 
             private void pausePlayback() {
+                if (mLossTransient) return;
                 mLossTransient = true;
                 wasPlaying = isPlaying();
                 if (wasPlaying)



More information about the Android mailing list