diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java index 35b1e7cf6ab..a024f0ab701 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java @@ -1,9 +1,5 @@ package com.mapbox.mapboxsdk; -import android.content.Context; - -import java.io.File; - import timber.log.Timber; /** @@ -11,8 +7,6 @@ */ public class LibraryLoader { - private static final String LIBRARY_NAME = "libmapbox-gl.so"; - /** * Loads "libmapbox-gl.so" native shared library. */ @@ -20,22 +14,7 @@ public static void load() { try { System.loadLibrary("mapbox-gl"); } catch (UnsatisfiedLinkError error) { - Context context = Mapbox.getApplicationContext(); - if (context != null) { - Timber.d("Loading %s from internal storage.", LIBRARY_NAME); - System.load(getLibraryLocation(context).getAbsolutePath()); - } + Timber.e(error, "Failed to load native shared library."); } } - - /** - * Returns a file in the app internal storage that may contain a locally cached copy - * of the Mapbox native library. - * - * @param context The application context - * @return a file object - */ - public static File getLibraryLocation(Context context) { - return new File(context.getFilesDir(), LIBRARY_NAME); - } }