[Android] libvlc: Add a few final

Thomas Guillem thomas at gllm.fr
Tue Jun 2 09:09:49 CEST 2015



On Tue, Jun 2, 2015, at 00:05, Jean-Baptiste Kempf wrote:
> vlc-ports/android | branch: master | Jean-Baptiste Kempf
> <jb at videolan.org> | Mon Jun  1 23:57:11 2015 +0200|
> [d74341890cbf2f1970cb6f9fab32955812458199] | committer: Jean-Baptiste
> Kempf
> 
> libvlc: Add a few final
> 
> > http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=d74341890cbf2f1970cb6f9fab32955812458199
> ---
> 
>  libvlc/src/org/videolan/libvlc/MediaList.java         |    2 +-
>  libvlc/src/org/videolan/libvlc/VLCObject.java         |    2 +-
>  libvlc/src/org/videolan/libvlc/media/MediaPlayer.java |    2 +-
>  libvlc/src/org/videolan/libvlc/util/MediaBrowser.java |   10 +++++-----
>  libvlc/src/org/videolan/libvlc/util/VLCUtil.java      |    2 +-
>  5 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/libvlc/src/org/videolan/libvlc/MediaList.java
> b/libvlc/src/org/videolan/libvlc/MediaList.java
> index 673e581..7432fcf 100644
> --- a/libvlc/src/org/videolan/libvlc/MediaList.java
> +++ b/libvlc/src/org/videolan/libvlc/MediaList.java
> @@ -43,7 +43,7 @@ public class MediaList extends VLCObject {
>      }
>  
>      private int mCount = 0;
> -    private SparseArray<Media> mMediaArray = new SparseArray<Media>();
> +    private final SparseArray<Media> mMediaArray = new
> SparseArray<Media>();
>  
>      private void init() {
>          mCount = nativeGetCount();
> diff --git a/libvlc/src/org/videolan/libvlc/VLCObject.java
> b/libvlc/src/org/videolan/libvlc/VLCObject.java
> index 50fded2..90c4e49 100644
> --- a/libvlc/src/org/videolan/libvlc/VLCObject.java
> +++ b/libvlc/src/org/videolan/libvlc/VLCObject.java
> @@ -216,7 +216,7 @@ public abstract class VLCObject {
>          if (event != null && mEventListener != null && mHandler != null)
>              mHandler.post(new EventRunnable(mEventListener, event));
>      }
> -    private final native void nativeDetachEvents();
> +    private native void nativeDetachEvents();

Why removing this final ?

>  
>      /* used only before API 7: substitute for NewWeakGlobalRef */
>      private Object getWeakReference() {
> diff --git a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
> b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
> index ac3c0b4..0e9dc2f 100644
> --- a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
> +++ b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
> @@ -67,7 +67,7 @@ public class MediaPlayer
>      public static final int
>      VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2;
>  
>      private Media mCurrentMedia = null;
> -    private LibVLC mLibVLC;
> +    private final LibVLC mLibVLC;
>      private org.videolan.libvlc.MediaPlayer mMediaPlayer;
>  
>      public MediaPlayer() {
> diff --git a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
> b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
> index fdcb43d..91cd7e5 100644
> --- a/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
> +++ b/libvlc/src/org/videolan/libvlc/util/MediaBrowser.java
> @@ -42,9 +42,9 @@ public class MediaBrowser {
>          //  "mdns"
>      } : new String[]{"upnp"} ; //Only UPnP for release
>  
> -    private LibVLC mLibVlc;
> -    private ArrayList<MediaDiscoverer> mMediaDiscoverers = new
> ArrayList<MediaDiscoverer>();
> -    private ArrayList<Media> mDiscovererMediaArray = new
> ArrayList<Media>();
> +    private final LibVLC mLibVlc;
> +    private final ArrayList<MediaDiscoverer> mMediaDiscoverers = new
> ArrayList<MediaDiscoverer>();
> +    private final ArrayList<Media> mDiscovererMediaArray = new
> ArrayList<Media>();
>      private MediaList mBrowserMediaList;
>      private Media mMedia;
>      private EventListener mEventListener;
> @@ -198,7 +198,7 @@ public class MediaBrowser {
>          return media;
>      }
>  
> -    private MediaList.EventListener mBrowserMediaListEventListener = new
> MediaList.EventListener() {
> +    private final MediaList.EventListener mBrowserMediaListEventListener
> = new MediaList.EventListener() {
>          @Override
>          public void onEvent(VLCObject.Event event) {
>              if (mEventListener == null)
> @@ -221,7 +221,7 @@ public class MediaBrowser {
>          }
>      };
>  
> -    private MediaList.EventListener mDiscovererMediaListEventListener =
> new MediaList.EventListener() {
> +    private final MediaList.EventListener
> mDiscovererMediaListEventListener = new MediaList.EventListener() {
>          @Override
>          public void onEvent(VLCObject.Event event) {
>              if (mEventListener == null)
> diff --git a/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
> b/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
> index 9fa2404..b6f20a0 100644
> --- a/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
> +++ b/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
> @@ -333,7 +333,7 @@ public class VLCUtil {
>      }
>  
>      /** '*' prefix means it's unsupported */
> -    private static String[] CPU_archs = {"*Pre-v4", "*v4", "*v4T",
> +    private final static String[] CPU_archs = {"*Pre-v4", "*v4", "*v4T",
>              "v5T", "v5TE", "v5TEJ",
>              "v6", "v6KZ", "v6T2", "v6K", "v7",
>              "*v6-M", "*v6S-M", "*v7E-M", "*v8"};
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android


More information about the Android mailing list