Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 6d67379

Browse files
authored
[android] Revert native loading behavior (#10180)
1 parent 50ee8da commit 6d67379

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,20 @@
11
package com.mapbox.mapboxsdk;
22

3-
import android.content.Context;
4-
5-
import java.io.File;
6-
73
import timber.log.Timber;
84

95
/**
106
* Centralises the knowledge about "mapbox-gl" library loading.
117
*/
128
public class LibraryLoader {
139

14-
private static final String LIBRARY_NAME = "libmapbox-gl.so";
15-
1610
/**
1711
* Loads "libmapbox-gl.so" native shared library.
1812
*/
1913
public static void load() {
2014
try {
2115
System.loadLibrary("mapbox-gl");
2216
} 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.");
2818
}
2919
}
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-
}
4120
}

0 commit comments

Comments
 (0)