diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java')
-rwxr-xr-x | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java index dcd6e54cbe..d427032b01 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java @@ -24,6 +24,7 @@ import com.mapbox.mapboxsdk.exceptions.CalledFromWorkerThreadException; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.geometry.ProjectedMeters; +import com.mapbox.mapboxsdk.log.Logger; import com.mapbox.mapboxsdk.maps.renderer.MapRenderer; import com.mapbox.mapboxsdk.storage.FileSource; import com.mapbox.mapboxsdk.style.expressions.Expression; @@ -33,7 +34,6 @@ import com.mapbox.mapboxsdk.style.light.Light; import com.mapbox.mapboxsdk.style.sources.CannotAddSourceException; import com.mapbox.mapboxsdk.style.sources.Source; import com.mapbox.mapboxsdk.utils.BitmapUtils; -import timber.log.Timber; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -46,6 +46,8 @@ import java.util.concurrent.CopyOnWriteArrayList; // Class that wraps the native methods for convenience final class NativeMapView { + private static final String TAG = "Mbgl-NativeMapView"; + //Hold a reference to prevent it from being GC'd as long as it's used on the native side private final FileSource fileSource; @@ -111,9 +113,9 @@ final class NativeMapView { // validate if map has already been destroyed if (destroyed && !TextUtils.isEmpty(callingMethod)) { - Timber.e( + Logger.e(TAG, String.format( "You're calling `%s` after the `MapView` was destroyed, were you invoking it after `onDestroy()`?", - callingMethod + callingMethod) ); } return destroyed; @@ -151,15 +153,17 @@ final class NativeMapView { if (width > 65535) { // we have seen edge cases where devices return incorrect values #6111 - Timber.e("Device returned an out of range width size, " - + "capping value at 65535 instead of %s", width); + Logger.e(TAG, String.format("Device returned an out of range width size, " + + "capping value at 65535 instead of %s", width) + ); width = 65535; } if (height > 65535) { // we have seen edge cases where devices return incorrect values #6111 - Timber.e("Device returned an out of range height size, " - + "capping value at 65535 instead of %s", height); + Logger.e(TAG, String.format("Device returned an out of range height size, " + + "capping value at 65535 instead of %s", height) + ); height = 65535; } @@ -902,7 +906,7 @@ final class NativeMapView { try { onMapChangedListener.onMapChanged(rawChange); } catch (RuntimeException err) { - Timber.e(err, "Exception in MapView.OnMapChangedListener"); + Logger.e(TAG, "Exception in MapView.OnMapChangedListener", err); } } } |