[Android] AudioService: don't pause video on incoming telephone call

Thomas Guillem git at videolan.org
Tue Mar 17 18:06:27 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 17 16:19:26 2015 +0100| [580965fc626953d737e1478a907bc44441208cd8] | committer: Thomas Guillem

AudioService: don't pause video on incoming telephone call

This fixes a mismatch between audioservice focus on videoplayer focus.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=580965fc626953d737e1478a907bc44441208cd8
---

 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();
             }
 



More information about the Android mailing list