This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Commit 6d67379 1 parent 50ee8da commit 6d67379 Copy full SHA for 6d67379
File tree 1 file changed +1
-22
lines changed
platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk
1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 1
1
package com .mapbox .mapboxsdk ;
2
2
3
- import android .content .Context ;
4
-
5
- import java .io .File ;
6
-
7
3
import timber .log .Timber ;
8
4
9
5
/**
10
6
* Centralises the knowledge about "mapbox-gl" library loading.
11
7
*/
12
8
public class LibraryLoader {
13
9
14
- private static final String LIBRARY_NAME = "libmapbox-gl.so" ;
15
-
16
10
/**
17
11
* Loads "libmapbox-gl.so" native shared library.
18
12
*/
19
13
public static void load () {
20
14
try {
21
15
System .loadLibrary ("mapbox-gl" );
22
16
} catch (UnsatisfiedLinkError error ) {
23
- Context context = Mapbox .getApplicationContext ();
24
- if (context != null ) {
25
- Timber .d ("Loading %s from internal storage." , LIBRARY_NAME );
26
- System .load (getLibraryLocation (context ).getAbsolutePath ());
27
- }
17
+ Timber .e (error , "Failed to load native shared library." );
28
18
}
29
19
}
30
-
31
- /**
32
- * Returns a file in the app internal storage that may contain a locally cached copy
33
- * of the Mapbox native library.
34
- *
35
- * @param context The application context
36
- * @return a file object
37
- */
38
- public static File getLibraryLocation (Context context ) {
39
- return new File (context .getFilesDir (), LIBRARY_NAME );
40
- }
41
20
}
You can’t perform that action at this time.
0 commit comments