[Android] Avoid switching to audio if connected to a renderer

Nicolas Pomepuy git at videolan.org
Tue Sep 13 12:10:54 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 12 08:34:01 2022 +0200| [cec1c44e9f47896cf113c0bf4746f2a40839edfb] | committer: Duncan McNamara

Avoid switching to audio if connected to a renderer

Fixes #2656

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

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index d08d19c92..140a56632 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -759,7 +759,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
         unregisterReceiver(btReceiver)
         alertDialog?.dismiss()
         if (displayManager.isPrimary && !isFinishing && service?.isPlaying == true
-                && "1" == settings.getString(KEY_VIDEO_APP_SWITCH, "0")) {
+                && "1" == settings.getString(KEY_VIDEO_APP_SWITCH, "0") && !PlaybackService.hasRenderer()) {
             switchToAudioMode(false)
         }
 



More information about the Android mailing list