[Android] Stop rendererDelegate when app goes in background

Geoffrey Métais git at videolan.org
Wed Jul 18 10:26:35 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jul 18 10:25:12 2018 +0200| [9efc1b246d2ea6f778344eac368424bf4f2efd7e] | committer: Geoffrey Métais

Stop rendererDelegate when app goes in background

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

 vlc-android/src/org/videolan/vlc/VLCApplication.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index 0e525b376..1ea2bd61d 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -303,7 +303,10 @@ public class VLCApplication extends Application {
 
         @Override
         public void onActivityStopped(Activity activity) {
-            if (--sActivitiesCount == 0)  ExternalMonitor.unregister(instance);
+            if (--sActivitiesCount == 0)  {
+                ExternalMonitor.unregister(instance);
+                RendererDelegate.INSTANCE.stop();
+            }
         }
 
         @Override



More information about the Android mailing list