[Android] Fix Java6 compilation

Jean-Baptiste Kempf git at videolan.org
Thu Jun 18 18:49:12 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 18 18:48:23 2015 +0200| [65876e1c52c3a30b7f8bdd8e32bf8519b6623400] | committer: Jean-Baptiste Kempf

Fix Java6 compilation

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=65876e1c52c3a30b7f8bdd8e32bf8519b6623400
---

 libvlc/src/org/videolan/libvlc/MediaList.java            |    4 ++--
 .../src/org/videolan/vlc/PlaybackServiceClient.java      |   14 +++++++-------
 .../videolan/vlc/gui/tv/browser/BrowserGridFragment.java |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/MediaList.java b/libvlc/src/org/videolan/libvlc/MediaList.java
index e5b1f5d..e61ff18 100644
--- a/libvlc/src/org/videolan/libvlc/MediaList.java
+++ b/libvlc/src/org/videolan/libvlc/MediaList.java
@@ -52,7 +52,7 @@ public class MediaList extends VLCObject<MediaList.Event> {
     public interface EventListener extends VLCEvent.Listener<MediaList.Event> {}
 
     private int mCount = 0;
-    private final SparseArray<Media> mMediaArray = new SparseArray<>();
+    private final SparseArray<Media> mMediaArray = new SparseArray<Media>();
     private boolean mLocked = false;
 
     private void init() {
@@ -208,4 +208,4 @@ public class MediaList extends VLCObject<MediaList.Event> {
     private native int nativeGetCount();
     private native void nativeLock();
     private native void nativeUnlock();
-}
\ No newline at end of file
+}
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackServiceClient.java b/vlc-android/src/org/videolan/vlc/PlaybackServiceClient.java
index 6561e64..5624563 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackServiceClient.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackServiceClient.java
@@ -607,7 +607,7 @@ public class PlaybackServiceClient implements ServiceConnection {
         new LoadCmd(mediaList, position, forceAudio).send(mIService);
     }
     public void load(MediaWrapper media, boolean forceAudio) {
-        ArrayList<MediaWrapper> arrayList = new ArrayList<>();
+        ArrayList<MediaWrapper> arrayList = new ArrayList<MediaWrapper>();
         arrayList.add(media);
         load(arrayList, 0, forceAudio);
     }
@@ -615,7 +615,7 @@ public class PlaybackServiceClient implements ServiceConnection {
         load(media, false);
     }
     public void loadLocation(String mediaPath) {
-        ArrayList < String > arrayList = new ArrayList<>();
+        ArrayList <String> arrayList = new ArrayList<String>();
         arrayList.add(mediaPath);
         loadLocations(arrayList, 0);
     }
@@ -623,7 +623,7 @@ public class PlaybackServiceClient implements ServiceConnection {
         new LoadLocationsCmd(mediaPathList, position).send(mIService);
     }
     public void append(MediaWrapper media) {
-        ArrayList<MediaWrapper> arrayList = new ArrayList<>();
+        ArrayList<MediaWrapper> arrayList = new ArrayList<MediaWrapper>();
         arrayList.add(media);
         append(arrayList);
     }
@@ -747,7 +747,7 @@ public class PlaybackServiceClient implements ServiceConnection {
 
     /* Static commands: can be run without a PlaybackServiceClient instance */
     public static void load(Context context, ResultCallback<Void> asyncCb, MediaWrapper media, boolean forceAudio) {
-        ArrayList<MediaWrapper> arrayList = new ArrayList<>();
+        ArrayList<MediaWrapper> arrayList = new ArrayList<MediaWrapper>();
         arrayList.add(media);
         load(context, asyncCb, arrayList, 0, forceAudio);
     }
@@ -761,7 +761,7 @@ public class PlaybackServiceClient implements ServiceConnection {
         new LoadCmd(mediaList, position, forceAudio).sendAsync(context, asyncCb);
     }
     public static void loadLocation(Context context, ResultCallback<Void> asyncCb, String mediaPath) {
-        ArrayList < String > arrayList = new ArrayList<>();
+        ArrayList <String> arrayList = new ArrayList<String>();
         arrayList.add(mediaPath);
         loadLocations(context, asyncCb, arrayList, 0);
     }
@@ -769,7 +769,7 @@ public class PlaybackServiceClient implements ServiceConnection {
         new LoadLocationsCmd(mediaPathList, position).sendAsync(context, asyncCb);
     }
     public static void append(Context context, ResultCallback<Void> asyncCb, MediaWrapper media) {
-        ArrayList<MediaWrapper> arrayList = new ArrayList<>();
+        ArrayList<MediaWrapper> arrayList = new ArrayList<MediaWrapper>();
         arrayList.add(media);
         append(context, asyncCb, arrayList);
     }
@@ -890,4 +890,4 @@ public class PlaybackServiceClient implements ServiceConnection {
     public static void handleVout(Context context, ResultCallback<Void> asyncCb) {
         new HandleVout().sendAsync(context, asyncCb);
     }
-}
\ No newline at end of file
+}
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
index 1383192..fde63ea 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/BrowserGridFragment.java
@@ -68,7 +68,7 @@ public class BrowserGridFragment extends GridFragment implements MediaBrowser.Ev
         if (mAdapter.size() == 0) {
             mMediaBrowser = new MediaBrowser(VLCInstance.get(), this);
             if (mMediaBrowser != null) {
-                mMediaList = new ArrayList<>();
+                mMediaList = new ArrayList<MediaWrapper>();
                 if (mUri != null)
                     mMediaBrowser.browse(mUri);
                 else



More information about the Android mailing list