[Android] Unset any renderer on disconnection

Geoffrey Métais git at videolan.org
Fri Mar 30 16:51:02 CEST 2018


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

Unset any renderer on disconnection

(cherry picked from commit dc8fbd5c27257b3ab4944a0b47df8f37b9b2421b)

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

 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