[Android] [PATCH 1/5] AudioService: don't pause video on incoming telephone call
Thomas Guillem
thomas at gllm.fr
Tue Mar 17 17:41:39 CET 2015
This fixes a mismatch between audioservice focus on videoplayer focus.
---
vlc-android/src/org/videolan/vlc/audio/AudioService.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index cf7add9..ba837c0 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -365,8 +365,8 @@ public class AudioService extends Service {
* Incoming Call : Pause if VLC is playing audio or video.
*/
if (action.equalsIgnoreCase(VLCApplication.INCOMING_CALL_INTENT)) {
- mWasPlayingAudio = mLibVLC.isPlaying() && mLibVLC.getVideoTracksCount() < 1;
- if (mLibVLC.isPlaying())
+ mWasPlayingAudio = mLibVLC.isPlaying() && hasCurrentMedia();
+ if (mWasPlayingAudio)
pause();
}
--
2.1.3
More information about the Android
mailing list