@@ -82,13 +82,13 @@ public class NativeLibraryLoader {
82
82
System .err .println ("File not available: " + file .getAbsolutePath ());
83
83
}
84
84
try {
85
- if (!android || !loadLibraryAndroid (libname )) { // if android && loadLibraryAndroid OK: done
85
+ if (!android || !loadLibraryAndroid ()) { // if android && loadLibraryAndroid OK: done
86
86
System .loadLibrary (libname );
87
87
}
88
88
} catch (UnsatisfiedLinkError e ) {
89
89
if (!android && isLinux ) {
90
90
// maybe is Android, but check failed: try loading Android lib
91
- if (!loadLibraryAndroid (OBJECTBOX_JNI )) {
91
+ if (!loadLibraryAndroid ()) {
92
92
System .loadLibrary (OBJECTBOX_JNI );
93
93
}
94
94
} else {
@@ -139,7 +139,7 @@ private static void checkUnpackLib(String filename) {
139
139
}
140
140
141
141
@ SuppressWarnings ("BooleanMethodIsAlwaysInverted" ) // more readable
142
- private static boolean loadLibraryAndroid (String libname ) {
142
+ private static boolean loadLibraryAndroid () {
143
143
if (BoxStore .context == null ) {
144
144
return false ;
145
145
}
@@ -151,11 +151,11 @@ private static boolean loadLibraryAndroid(String libname) {
151
151
// use default ReLinker
152
152
Class <?> relinker = Class .forName ("com.getkeepsafe.relinker.ReLinker" );
153
153
Method loadLibrary = relinker .getMethod ("loadLibrary" , context , String .class , String .class );
154
- loadLibrary .invoke (null , BoxStore .context , libname , BoxStore .JNI_VERSION );
154
+ loadLibrary .invoke (null , BoxStore .context , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
155
155
} else {
156
156
// use custom ReLinkerInstance
157
157
Method loadLibrary = BoxStore .relinker .getClass ().getMethod ("loadLibrary" , context , String .class , String .class );
158
- loadLibrary .invoke (BoxStore .relinker , BoxStore .context , libname , BoxStore .JNI_VERSION );
158
+ loadLibrary .invoke (BoxStore .relinker , BoxStore .context , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
159
159
}
160
160
} catch (NoSuchMethodException e ) {
161
161
return false ;
0 commit comments