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

Geoffrey Métais git at videolan.org
Tue Jun 14 11:01:51 CEST 2016


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

Group lib compat load in global try/catch

(cherry picked from commit 63e40d150249ae50cd598b7455966d4ade003c62)

> https://code.videolan.org/videolan/vlc-android/commit/0ae99fbdf4355bd4e52af9a92825400087c54c1c
---

 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