[Android] Unregister ML callbacks before cancelling tasks

Geoffrey Métais git at videolan.org
Thu Oct 11 11:14:14 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 11 10:27:00 2018 +0200| [50dda20b43863afb697e3dbfb4bfd1b4c44d7c5a] | committer: Geoffrey Métais

Unregister ML callbacks before cancelling tasks

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

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

diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
index a78494cc3..5b905fbe0 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
@@ -44,7 +44,7 @@ abstract class MedialibraryModel<T : MediaLibraryItem>(context: Context) : BaseM
     }
 
     override fun onCleared() {
-        super.onCleared()
         medialibrary.removeOnMedialibraryReadyListener(this)
+        super.onCleared()
     }
 }
\ No newline at end of file



More information about the Android mailing list