[Android] Set Medialibrary instance @NonNull
Geoffrey Métais
git at videolan.org
Wed Apr 4 18:35:39 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 20 18:29:45 2018 +0100| [e1feb7fd9a783814f5b9dbe9aa5b898c90dde6b4] | committer: Geoffrey Métais
Set Medialibrary instance @NonNull
> https://code.videolan.org/videolan/vlc-android/commit/e1feb7fd9a783814f5b9dbe9aa5b898c90dde6b4
---
medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 1 +
vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index 4681a7b9d..7c56d0364 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -170,6 +170,7 @@ public class Medialibrary {
super.finalize();
}
+ @NonNull
public static Medialibrary getInstance() {
return instance;
}
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
index eb73c069f..7b4026117 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/MedialibraryModel.kt
@@ -31,7 +31,7 @@ import org.videolan.vlc.util.EmptyMLCallbacks
abstract class MedialibraryModel<T : MediaLibraryItem> : BaseModel<T>(), Medialibrary.OnMedialibraryReadyListener, MediaUpdatedCb by EmptyMLCallbacks, MediaAddedCb by EmptyMLCallbacks {
- val medialibrary = Medialibrary.getInstance()!!
+ val medialibrary = Medialibrary.getInstance()
override fun fetch() {
medialibrary.addOnMedialibraryReadyListener(this)
More information about the Android
mailing list