[Android] Browser: clear listener in background

Geoffrey Métais git at videolan.org
Wed Sep 25 16:06:15 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Sep 25 15:50:47 2019 +0200| [6781cb34fdb0c25c82a047f643a409414c95212b] | committer: Geoffrey Métais

Browser: clear listener in background

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

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

diff --git a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
index e65fb0774..ec25b5cb5 100644
--- a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
@@ -147,7 +147,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
                 override fun onMediaRemoved(index: Int, media: Media) {}
             }
             requestBrowsing(url, listener, interact)
-            awaitClose { mediabrowser?.changeEventListener(null) }
+            awaitClose { if (url != null) browserActor.post(ClearListener) }
         }
     }
 



More information about the Android mailing list