[Android] LibVLC: add nullability annotations
Geoffrey Métais
git at videolan.org
Thu Nov 15 16:33:35 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 15 16:33:17 2018 +0100| [5fba0a43187fdc0081e1208e9b03a4e63a171620] | committer: Geoffrey Métais
LibVLC: add nullability annotations
> https://code.videolan.org/videolan/vlc-android/commit/5fba0a43187fdc0081e1208e9b03a4e63a171620
---
libvlc/src/org/videolan/libvlc/MediaPlayer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index b7c6dff65..dd1898dc5 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -591,6 +591,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
/**
* Get the IVLCVout helper.
*/
+ @NonNull
public IVLCVout getVLCVout() {
return mWindow;
}
@@ -647,7 +648,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
*
* @param media a valid Media object
*/
- public void setMedia(Media media) {
+ public void setMedia(@Nullable Media media) {
if (media != null) {
if (media.isReleased())
throw new IllegalArgumentException("Media is released");
@@ -668,7 +669,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
* Set a renderer
* @param item {@link RendererItem}. if null VLC play on default output
*/
- public int setRenderer(RendererItem item) {
+ public int setRenderer(@Nullable RendererItem item) {
return nativeSetRenderer(item);
}
@@ -683,6 +684,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
/**
* Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}.
*/
+ @Nullable
public synchronized Media getMedia() {
if (mMedia != null)
mMedia.retain();
More information about the Android
mailing list