diff options
author | Antonio Zugaldia <antonio@mapbox.com> | 2017-10-11 09:06:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 09:06:58 -0400 |
commit | 6d673799f8e632e5566197433f67c39fd3663565 (patch) | |
tree | 3c67cfc194159205ea57b6cb74b5a1acb80eacfe | |
parent | 50ee8daca1cfc7288bcc39ba962a2af6118e174b (diff) | |
download | qtlocation-mapboxgl-6d673799f8e632e5566197433f67c39fd3663565.tar.gz |
[android] Revert native loading behavior (#10180)
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java | 23 |
1 files changed, 1 insertions, 22 deletions
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 35b1e7cf6a..a024f0ab70 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 @@ import timber.log.Timber; */ public class LibraryLoader { - private static final String LIBRARY_NAME = "libmapbox-gl.so"; - /** * Loads "libmapbox-gl.so" native shared library. */ @@ -20,22 +14,7 @@ public class LibraryLoader { 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); - } } |