[Android] Stop playback on permanent audio focus loss
Geoffrey Métais
git at videolan.org
Mon Nov 7 16:07:14 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Nov 7 16:06:12 2016 +0100| [67290fadd7a467ff0f119c7e2f115a9b1a3acf07] | committer: Geoffrey Métais
Stop playback on permanent audio focus loss
This way we give up media buttons controls
> https://code.videolan.org/videolan/vlc-android/commit/67290fadd7a467ff0f119c7e2f115a9b1a3acf07
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index d572c7e..8b5cb8d 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -340,9 +340,8 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
switch (focusChange) {
case AudioManager.AUDIOFOCUS_LOSS:
Log.i(TAG, "AUDIOFOCUS_LOSS");
- // Pause playback
- changeAudioFocus(false);
- pause();
+ // Stop playback
+ stopPlayback();
break;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
Log.i(TAG, "AUDIOFOCUS_LOSS_TRANSIENT");
More information about the Android
mailing list