[Android] Unset any renderer on disconnection

Geoffrey Métais git at videolan.org
Thu Mar 8 14:25:22 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar  8 14:19:00 2018 +0100| [dc8fbd5c27257b3ab4944a0b47df8f37b9b2421b] | committer: Geoffrey Métais

Unset any renderer on disconnection

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

 vlc-android/src/org/videolan/vlc/gui/ContentActivity.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java b/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
index d01a698b5..acc95577a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
@@ -242,6 +242,10 @@ public class ContentActivity extends AudioPlayerContainerActivity implements Sea
     @Override
     public void onRenderersChanged(boolean empty) {
         showRenderers = !empty;
+        if (empty && !AndroidDevices.isChromeBook) {
+            RendererDelegate.INSTANCE.selectRenderer(null);
+            if (mService != null) mService.setRenderer(null);
+        }
         supportInvalidateOptionsMenu();
     }
 



More information about the Android mailing list