[Android] Group lib compat load in global try/catch

Geoffrey Métais git at videolan.org
Fri Jun 10 14:51:12 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 10 14:34:27 2016 +0200| [63e40d150249ae50cd598b7455966d4ade003c62] | committer: Geoffrey Métais

Group lib compat load in global try/catch

> https://code.videolan.org/videolan/vlc-android/commit/63e40d150249ae50cd598b7455966d4ade003c62
---

 libvlc/src/org/videolan/libvlc/LibVLC.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 94d91af..f4a6b5a 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -20,14 +20,13 @@
 
 package org.videolan.libvlc;
 
-import java.util.ArrayList;
-
 import android.os.Build;
 import android.util.Log;
-import android.view.Surface;
 
 import org.videolan.libvlc.util.HWDecoderUtil;
 
+import java.util.ArrayList;
+
 @SuppressWarnings("unused, JniMissingFunction")
 public class LibVLC extends VLCObject<LibVLC.Event> {
     private static final String TAG = "VLC/LibVLC";
@@ -153,7 +152,6 @@ public class LibVLC extends VLCObject<LibVLC.Event> {
             return;
         sLoaded = true;
 
-        System.loadLibrary("compat.7");
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1) {
             try {
                 if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB_MR1)
@@ -189,6 +187,7 @@ public class LibVLC extends VLCObject<LibVLC.Event> {
         }
 
         try {
+            System.loadLibrary("compat.7");
             System.loadLibrary("vlc");
             System.loadLibrary("vlcjni");
         } catch (UnsatisfiedLinkError ule) {



More information about the Android mailing list