@@ -181,22 +181,22 @@ private static void checkUnpackLib(String filename) {
181
181
}
182
182
183
183
private static boolean loadLibraryAndroid () {
184
- if (BoxStore .context == null ) {
184
+ if (BoxStore .getContext () == null ) {
185
185
return false ;
186
186
}
187
187
188
188
//noinspection TryWithIdenticalCatches
189
189
try {
190
190
Class <?> context = Class .forName ("android.content.Context" );
191
- if (BoxStore .relinker == null ) {
191
+ if (BoxStore .getRelinker () == null ) {
192
192
// use default ReLinker
193
193
Class <?> relinker = Class .forName ("com.getkeepsafe.relinker.ReLinker" );
194
194
Method loadLibrary = relinker .getMethod ("loadLibrary" , context , String .class , String .class );
195
- loadLibrary .invoke (null , BoxStore .context , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
195
+ loadLibrary .invoke (null , BoxStore .getContext () , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
196
196
} else {
197
197
// use custom ReLinkerInstance
198
- Method loadLibrary = BoxStore .relinker .getClass ().getMethod ("loadLibrary" , context , String .class , String .class );
199
- loadLibrary .invoke (BoxStore .relinker , BoxStore .context , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
198
+ Method loadLibrary = BoxStore .getRelinker () .getClass ().getMethod ("loadLibrary" , context , String .class , String .class );
199
+ loadLibrary .invoke (BoxStore .getRelinker () , BoxStore .getContext () , OBJECTBOX_JNI , BoxStore .JNI_VERSION );
200
200
}
201
201
} catch (NoSuchMethodException e ) {
202
202
return false ;
0 commit comments