summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle2
-rw-r--r--platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml37
-rw-r--r--platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml587
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java15
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java5
-rwxr-xr-xplatform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java10
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java4
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java4
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java10
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java6
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml4
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml5
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/drawable-nodpi/mapbox_mapview_preview.jpg (renamed from platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg)bin166053 -> 166053 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.pngbin928 -> 0 bytes
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml1
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml3
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml7
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml1
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml9
23 files changed, 82 insertions, 636 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 0cb6e529f1..5e7025c4c8 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -116,7 +116,7 @@ android {
}
lintOptions {
- baseline file("lint-baseline.xml")
+ baseline file("lint-baseline-local.xml")
checkAllWarnings true
warningsAsErrors true
}
diff --git a/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml b/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml
new file mode 100644
index 0000000000..0a76f53505
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/lint-baseline-local.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="4" by="lint 2.3.1">
+
+ <issue
+ id="MissingTranslation"
+ message="&quot;`mapbox_attributionErrorNoBrowser`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
+ errorLine1=" &lt;string name=&quot;mapbox_attributionErrorNoBrowser&quot;>No web browser installed on device, can\&apos;t open web page.&lt;/string>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/res/values/strings.xml"
+ line="13"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="MissingTranslation"
+ message="&quot;`mapbox_telemetrySettings`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
+ errorLine1=" &lt;string name=&quot;mapbox_telemetrySettings&quot;>Telemetry Settings&lt;/string>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/res/values/strings.xml"
+ line="15"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="TypographyQuotes"
+ message="Replace straight quotes (&apos;&apos;) with directional quotes (‘’, &amp;#8216; and &amp;#8217;) ?"
+ errorLine1=" &lt;string name=&quot;mapbox_attributionTelemetryMessage&quot;>Estàs ajudant a millorar els mapes d\&apos;OpenStreetMap i de Mapbox aportant dades d\&apos;ús anònimes.&lt;/string>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-ca/strings.xml"
+ line="9"
+ column="55"/>
+ </issue>
+
+</issues>
diff --git a/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml b/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml
index 4dc8ecde70..fd65c9f627 100644
--- a/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml
+++ b/platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- REMEMBER! First you run Lint locally you'll need to move the lint-baseline.xml file
+<!-- REMEMBER! First you run Lint locally you'll need to move lint-baseline-local.xml.xml file
generated into the lint folder and called it lint-baseline-local.xml
If you remove any error when running Lint locally, you'll get a warning from the command
line advising you to remove it from the baseline. If you remove it (remember to remove it
@@ -9,94 +9,6 @@
<issues format="4" by="lint 2.3.1">
<issue
- id="MissingPermission"
- message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
- errorLine1=" Location lastKnownLocation = locationEngine.getLastLocation();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
- line="783"
- column="38"/>
- </issue>
-
- <issue
- id="MissingPermission"
- message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
- errorLine1=" locationEngine.requestLocationUpdates();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
- line="787"
- column="9"/>
- </issue>
-
- <issue
- id="DefaultLocale"
- message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
- errorLine1=" Timber.v(String.format(&quot;[HTTP] Request was successful (code = %d).&quot;, response.code()));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="112"
- column="16"/>
- </issue>
-
- <issue
- id="DefaultLocale"
- message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
- errorLine1=" Timber.d(String.format("
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="116"
- column="16"/>
- </issue>
-
- <issue
- id="TimberArgCount"
- message="Wrong argument count, format string `Failed to read the package metadata: ` requires `0` but format call supplies `1`"
- errorLine1=" Timber.e(&quot;Failed to read the package metadata: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="75"
- column="7"/>
- </issue>
-
- <issue
- id="TimberArgCount"
- message="Wrong argument count, format string `Failed to read the storage key: ` requires `0` but format call supplies `1`"
- errorLine1=" Timber.e(&quot;Failed to read the storage key: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="77"
- column="7"/>
- </issue>
-
- <issue
- id="TimberArgCount"
- message="Wrong argument count, format string `Failed to obtain the external storage path: ` requires `0` but format call supplies `1`"
- errorLine1=" Timber.e(&quot;Failed to obtain the external storage path: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="86"
- column="9"/>
- </issue>
-
- <issue
- id="TimberArgCount"
- message="Wrong argument count, format string `Failed to delete old ambient cache database: ` requires `0` but format call supplies `1`"
- errorLine1=" Timber.e(&quot;Failed to delete old ambient cache database: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
- line="113"
- column="11"/>
- </issue>
-
- <issue
id="MissingTranslation"
message="&quot;`mapbox_attributionErrorNoBrowser`&quot; is not translated in &quot;ca&quot; (Catalan), &quot;es&quot; (Spanish), &quot;lt&quot; (Lithuanian), &quot;nl&quot; (Dutch), &quot;sv&quot; (Swedish), &quot;vi&quot; (Vietnamese)"
errorLine1=" &lt;string name=&quot;mapbox_attributionErrorNoBrowser&quot;>No web browser installed on device, can\&apos;t open web page.&lt;/string>"
@@ -119,431 +31,6 @@
</issue>
<issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.v(&quot;Connected: &quot; + connected);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
- line="85"
- column="14"/>
- </issue>
-
- <issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.e(&quot;Device returned an out of range width size, &quot;"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
- line="178"
- column="16"/>
- </issue>
-
- <issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.e(&quot;Device returned an out of range height size, &quot;"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
- line="185"
- column="16"/>
- </issue>
-
- <issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.d(&quot;Old ambient cache database deleted to save space: &quot; + path);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
- line="110"
- column="22"/>
- </issue>
-
- <issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.e(&quot;Not setting minZoomPreference, value is in unsupported range: &quot; + minZoom);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
- line="349"
- column="16"/>
- </issue>
-
- <issue
- id="BinaryOperationInTimber"
- message="Replace String concatenation with Timber&apos;s string formatting"
- errorLine1=" Timber.e(&quot;Not setting maxZoomPreference, value is in unsupported range: &quot; + maxZoom);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
- line="361"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.e(String.format(&quot;Stops: %s is a different type: %s&quot;, stops.getClass(), exception));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java"
- line="282"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.v(String.format(&quot;[HTTP] Request was successful (code = %d).&quot;, response.code()));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="112"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.d(String.format("
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="116"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="163"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="166"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
- line="170"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.e(String.format(&quot;Layer: %s is a different type: %s&quot;, layerId, exception));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
- line="286"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.e(String.format(&quot;Source: %s is a different type: %s&quot;, sourceId, exception));"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
- line="407"
- column="16"/>
- </issue>
-
- <issue
- id="StringFormatInTimber"
- message="Using &apos;String#format&apos; inside of &apos;Timber&apos;"
- errorLine1=" Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
- line="92"
- column="16"/>
- </issue>
-
- <issue
- id="ThrowableNotAtBeginning"
- message="Throwable should be first argument"
- errorLine1=" Timber.e(&quot;Failed to read the package metadata: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="75"
- column="7"/>
- </issue>
-
- <issue
- id="ThrowableNotAtBeginning"
- message="Throwable should be first argument"
- errorLine1=" Timber.e(&quot;Failed to read the storage key: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="77"
- column="7"/>
- </issue>
-
- <issue
- id="ThrowableNotAtBeginning"
- message="Throwable should be first argument"
- errorLine1=" Timber.e(&quot;Failed to obtain the external storage path: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
- line="86"
- column="9"/>
- </issue>
-
- <issue
- id="ThrowableNotAtBeginning"
- message="Throwable should be first argument"
- errorLine1=" Timber.e(&quot;Failed to delete old ambient cache database: &quot;, exception);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
- line="113"
- column="11"/>
- </issue>
-
- <issue
- id="StaticFieldLeak"
- message="Do not place Android context classes in static fields (static reference to `ConnectivityReceiver` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
- errorLine1=" private static ConnectivityReceiver INSTANCE;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
- line="24"
- column="3"/>
- </issue>
-
- <issue
- id="StaticFieldLeak"
- message="Do not place Android context classes in static fields (static reference to `IconFactory` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
- errorLine1=" private static IconFactory instance;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java"
- line="38"
- column="3"/>
- </issue>
-
- <issue
- id="StaticFieldLeak"
- message="Do not place Android context classes in static fields (static reference to `Mapbox` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
- errorLine1=" private static Mapbox INSTANCE;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/Mapbox.java"
- line="29"
- column="3"/>
- </issue>
-
- <issue
- id="StaticFieldLeak"
- message="Do not place Android context classes in static fields (static reference to `OfflineManager` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
- errorLine1=" // This object is implemented as a singleton"
- errorLine2=" ^">
- <location
- file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
- line="42"
- column="3"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.mapbox_my_location_ring` appears to be unused"
- errorLine1=" &lt;color name=&quot;mapbox_my_location_ring&quot;>@color/mapbox_blue&lt;/color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="6"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_infowindow_offset` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_infowindow_offset&quot;>-2dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="5"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_infowindow_line_width` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_infowindow_line_width&quot;>1.5dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="6"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_attribution_icon_left_padding` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_left_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="7"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_attribution_icon_top_padding` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_top_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="8"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_attribution_icon_right_padding` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_right_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="9"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_attribution_icon_bottom_padding` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_attribution_icon_bottom_padding&quot;>@dimen/mapbox_two_dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="10"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_two_dp` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_two_dp&quot;>2dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="11"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_ten_dp` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_ten_dp&quot;>10dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="14"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.dimen.mapbox_sixteen_dp` appears to be unused"
- errorLine1=" &lt;dimen name=&quot;mapbox_sixteen_dp&quot;>16dp&lt;/dimen>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/dimens.xml"
- line="15"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.drawable.mapbox_infowindow_icon_bg` appears to be unused">
- <location
- file="src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.mapbox_material_bg_selector` appears to be unused"
- errorLine1="&lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;>"
- errorLine2="^">
- <location
- file="src/main/res/color/mapbox_material_bg_selector.xml"
- line="2"
- column="1"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.string.mapbox_style_outdoors` appears to be unused"
- errorLine1=" &lt;string name=&quot;mapbox_style_outdoors&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/outdoors-v10&lt;/string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/strings.xml"
- line="22"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.string.mapbox_style_traffic_day` appears to be unused"
- errorLine1=" &lt;string name=&quot;mapbox_style_traffic_day&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/traffic-day-v2&lt;/string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/strings.xml"
- line="27"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.string.mapbox_style_traffic_night` appears to be unused"
- errorLine1=" &lt;string name=&quot;mapbox_style_traffic_night&quot; translatable=&quot;false&quot;>mapbox://styles/mapbox/traffic-night-v2&lt;/string>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/strings.xml"
- line="28"
- column="13"/>
- </issue>
-
- <issue
- id="UnusedIds"
- message="The resource `R.id.infowindow_subdescription` appears to be unused"
- errorLine1=" android:id=&quot;@+id/infowindow_subdescription&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/mapbox_infowindow_content.xml"
- line="43"
- column="9"/>
- </issue>
-
- <issue
id="TypographyQuotes"
message="Replace straight quotes (&apos;&apos;) with directional quotes (‘’, &amp;#8216; and &amp;#8217;) ?"
errorLine1=" &lt;string name=&quot;mapbox_attributionTelemetryMessage&quot;>Estàs ajudant a millorar els mapes d\&apos;OpenStreetMap i de Mapbox aportant dades d\&apos;ús anònimes.&lt;/string>"
@@ -554,76 +41,4 @@
column="55"/>
</issue>
- <issue
- id="IconDensities"
- message="Missing the following drawables in `drawable-hdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
- <location
- file="src/main/res/drawable-hdpi"/>
- </issue>
-
- <issue
- id="IconDensities"
- message="Missing the following drawables in `drawable-mdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
- <location
- file="src/main/res/drawable-mdpi"/>
- </issue>
-
- <issue
- id="IconDensities"
- message="Missing the following drawables in `drawable-xhdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
- <location
- file="src/main/res/drawable-xhdpi"/>
- </issue>
-
- <issue
- id="IconDensities"
- message="Missing the following drawables in `drawable-xxhdpi`: mapbox_infowindow_icon_bg.9.png (found in drawable-xxxhdpi)">
- <location
- file="src/main/res/drawable-xxhdpi"/>
- </issue>
-
- <issue
- id="SelectableText"
- message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
- errorLine1="&lt;TextView"
- errorLine2="^">
- <location
- file="src/main/res/layout/mapbox_attribution_list_item.xml"
- line="2"
- column="1"/>
- </issue>
-
- <issue
- id="SelectableText"
- message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
- errorLine1=" &lt;TextView"
- errorLine2=" ^">
- <location
- file="src/main/res/layout/mapbox_infowindow_content.xml"
- line="21"
- column="5"/>
- </issue>
-
- <issue
- id="SelectableText"
- message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
- errorLine1=" &lt;TextView"
- errorLine2=" ^">
- <location
- file="src/main/res/layout/mapbox_infowindow_content.xml"
- line="31"
- column="5"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="[Accessibility] Missing `contentDescription` attribute on image"
- errorLine1="&lt;ImageView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
- errorLine2="^">
- <location
- file="src/main/res/layout/mapbox_view_image_marker.xml"
- line="2"
- column="1"/>
- </issue>
-
</issues>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
index 3af7921596..70b13f05fb 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@@ -26,6 +27,7 @@ import com.mapbox.services.android.telemetry.location.LocationEnginePriority;
@UiThread
public final class Mapbox {
+ @SuppressLint("StaticFieldLeak")
private static Mapbox INSTANCE;
private Context context;
private String accessToken;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
index f9ca9bf4cc..3c9cb31211 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java
@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.annotations;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -35,6 +36,7 @@ public final class IconFactory {
public static final String ICON_MARKERVIEW_ID = ICON_ID_PREFIX + "marker_view";
private Context context;
+ @SuppressLint("StaticFieldLeak")
private static IconFactory instance;
private Icon defaultMarker;
private Icon defaultMarkerView;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java
index 9c8cda5544..91a235616a 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java
@@ -109,13 +109,11 @@ class HTTPRequest implements Callback {
@Override
public void onResponse(Call call, Response response) throws IOException {
if (response.isSuccessful()) {
- Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));
+ Timber.v("[HTTP] Request was successful (code = %s).", response.code());
} else {
// We don't want to call this unsuccessful because a 304 isn't really an error
String message = !TextUtils.isEmpty(response.message()) ? response.message() : "No additional information";
- Timber.d(String.format(
- "[HTTP] Request with response code = %d: %s",
- response.code(), message));
+ Timber.d("[HTTP] Request with response code = %s: %s", response.code(), message);
}
byte[] body;
@@ -160,15 +158,12 @@ class HTTPRequest implements Callback {
String errorMessage = e.getMessage() != null ? e.getMessage() : "Error processing the request";
if (type == TEMPORARY_ERROR) {
- Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,
- "Request failed due to a temporary error: %s", errorMessage));
+ Timber.d("Request failed due to a temporary error: %s", errorMessage);
} else if (type == CONNECTION_ERROR) {
- Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,
- "Request failed due to a connection error: %s", errorMessage));
+ Timber.i("Request failed due to a connection error: %s", errorMessage);
} else {
// PERMANENT_ERROR
- Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,
- "Request failed due to a permanent error: %s", errorMessage));
+ Timber.w("Request failed due to a permanent error: %s", errorMessage);
}
mLock.lock();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index f47fcdfd4a..3b8bc16bb3 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -272,7 +272,6 @@ public final class MapboxMap {
* Check whether tile pre-fetching is enabled or not.
*
* @return true if enabled
- *
* @see MapboxMap#setPrefetchesTiles(boolean)
*/
@UiThread
@@ -316,7 +315,7 @@ public final class MapboxMap {
// noinspection unchecked
return (T) nativeMapView.getLayer(layerId);
} catch (ClassCastException exception) {
- Timber.e(String.format("Layer: %s is a different type: %s", layerId, exception));
+ Timber.e(exception, "Layer: %s is a different type: ", layerId);
return null;
}
}
@@ -437,7 +436,7 @@ public final class MapboxMap {
// noinspection unchecked
return (T) nativeMapView.getSource(sourceId);
} catch (ClassCastException exception) {
- Timber.e(String.format("Source: %s is a different type: %s", sourceId, exception));
+ Timber.e(exception, "Source: %s is a different type: ", sourceId);
return null;
}
}
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 52596358e2..ddeb4b326e 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
@@ -17,7 +17,6 @@ import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.Polygon;
import com.mapbox.mapboxsdk.annotations.Polyline;
import com.mapbox.mapboxsdk.camera.CameraPosition;
-import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
import com.mapbox.mapboxsdk.geometry.ProjectedMeters;
@@ -84,9 +83,10 @@ final class NativeMapView {
private boolean isDestroyedOn(String callingMethod) {
if (destroyed && !TextUtils.isEmpty(callingMethod)) {
- Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,
+ Timber.e(
"You're calling `%s` after the `MapView` was destroyed, were you invoking it after `onDestroy()`?",
- callingMethod));
+ callingMethod
+ );
}
return destroyed;
}
@@ -143,14 +143,14 @@ 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 " + width);
+ + "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 " + height);
+ + "capping value at 65535 instead of %s", height);
height = 65535;
}
nativeResizeView(width, height);
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
index d788b7772b..6f63c2eba8 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
@@ -346,7 +346,7 @@ final class Transform implements MapView.OnMapChangedListener {
void setMinZoom(double minZoom) {
if ((minZoom < MapboxConstants.MINIMUM_ZOOM) || (minZoom > MapboxConstants.MAXIMUM_ZOOM)) {
- Timber.e("Not setting minZoomPreference, value is in unsupported range: " + minZoom);
+ Timber.e("Not setting minZoomPreference, value is in unsupported range: %s", minZoom);
return;
}
mapView.setMinZoom(minZoom);
@@ -358,7 +358,7 @@ final class Transform implements MapView.OnMapChangedListener {
void setMaxZoom(double maxZoom) {
if ((maxZoom < MapboxConstants.MINIMUM_ZOOM) || (maxZoom > MapboxConstants.MAXIMUM_ZOOM)) {
- Timber.e("Not setting maxZoomPreference, value is in unsupported range: " + maxZoom);
+ Timber.e("Not setting maxZoomPreference, value is in unsupported range: %s", maxZoom);
return;
}
mapView.setMaxZoom(maxZoom);
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
index 017fdb353a..4e696fb56b 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
@@ -1,6 +1,7 @@
package com.mapbox.mapboxsdk.maps.widgets;
import android.animation.ValueAnimator;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Camera;
import android.graphics.Canvas;
@@ -775,6 +776,7 @@ public class MyLocationView extends View {
locationSource = new WeakReference<>(locationEngine);
}
+ @SuppressLint("MissingPermission")
@Override
public void onConnected() {
MyLocationView locationView = userLocationView.get();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java
index a1bd98b780..817dcdb438 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java
@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.net;
+import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -21,6 +22,7 @@ import timber.log.Timber;
* Not public api.
*/
public class ConnectivityReceiver extends BroadcastReceiver {
+ @SuppressLint("StaticFieldLeak")
private static ConnectivityReceiver INSTANCE;
/**
@@ -82,7 +84,7 @@ public class ConnectivityReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
boolean connected = isConnected(context);
- Timber.v("Connected: " + connected);
+ Timber.v("Connected: %s", connected);
// Loop over listeners
for (ConnectivityListener listener : listeners) {
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
index 1e6f44f094..130284e88d 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java
@@ -1,5 +1,6 @@
package com.mapbox.mapboxsdk.offline;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
@@ -40,6 +41,7 @@ public class OfflineManager {
private Handler handler;
// This object is implemented as a singleton
+ @SuppressLint("StaticFieldLeak")
private static OfflineManager instance;
// The application context
@@ -90,11 +92,11 @@ public class OfflineManager {
*/
private OfflineManager(Context context) {
this.context = context.getApplicationContext();
- this.fileSource = FileSource.getInstance(context);
+ this.fileSource = FileSource.getInstance(this.context);
initialize(fileSource);
// Delete any existing previous ambient cache database
- deleteAmbientDatabase(context);
+ deleteAmbientDatabase(this.context);
}
private void deleteAmbientDatabase(final Context context) {
@@ -107,10 +109,10 @@ public class OfflineManager {
File file = new File(path);
if (file.exists()) {
file.delete();
- Timber.d("Old ambient cache database deleted to save space: " + path);
+ Timber.d("Old ambient cache database deleted to save space: %s", path);
}
} catch (Exception exception) {
- Timber.e("Failed to delete old ambient cache database: ", exception);
+ Timber.e(exception, "Failed to delete old ambient cache database: ");
}
}
}).start();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java
index eafef80e8d..a968cdf192 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java
@@ -72,9 +72,9 @@ public class FileSource {
MapboxConstants.KEY_META_DATA_SET_STORAGE_EXTERNAL,
MapboxConstants.DEFAULT_SET_STORAGE_EXTERNAL);
} catch (PackageManager.NameNotFoundException exception) {
- Timber.e("Failed to read the package metadata: ", exception);
+ Timber.e(exception,"Failed to read the package metadata: ");
} catch (Exception exception) {
- Timber.e("Failed to read the storage key: ", exception);
+ Timber.e(exception, "Failed to read the storage key: ");
}
String cachePath = null;
@@ -83,7 +83,7 @@ public class FileSource {
// Try getting the external storage path
cachePath = context.getExternalFilesDir(null).getAbsolutePath();
} catch (NullPointerException exception) {
- Timber.e("Failed to obtain the external storage path: ", exception);
+ Timber.e(exception, "Failed to obtain the external storage path: ");
}
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java
index e1e40821b1..e7bb52ebb3 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java
@@ -279,7 +279,7 @@ public class Function<I, O> {
// noinspection unchecked
return (S) stops;
} catch (ClassCastException exception) {
- Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception));
+ Timber.e(exception, "Stops: %s is a different type: ", stops.getClass());
return null;
}
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
index 3decd6ead1..d59eef7427 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
@@ -83,11 +83,13 @@
<!-- Exposed styles -->
<public name="mapbox_style_mapbox_streets" type="string" />
- <public name="mapbox_style_emerald" type="string" />
+ <public name="mapbox_style_outdoors" type="string" />
<public name="mapbox_style_light" type="string" />
<public name="mapbox_style_dark" type="string" />
<public name="mapbox_style_satellite" type="string" />
<public name="mapbox_style_satellite_streets" type="string" />
+ <public name="mapbox_style_traffic_day" type="string" />
+ <public name="mapbox_style_traffic_night" type="string" />
<!-- Exposed strings -->
<public name="mapbox_compassContentDescription" type="string" />
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml
deleted file mode 100644
index 4c733ed112..0000000000
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="?attr/colorPrimaryDark" android:state_pressed="true" />
- <item android:color="?attr/colorPrimary" />
-</selector>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-nodpi/mapbox_mapview_preview.jpg
index 3a21fc08bc..3a21fc08bc 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/mapbox_mapview_preview.jpg
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-nodpi/mapbox_mapview_preview.jpg
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png b/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png
deleted file mode 100644
index 584b320299..0000000000
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml
index 763bb118e0..648946e8ce 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_attribution_list_item.xml
@@ -9,5 +9,6 @@
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:textAllCaps="true"
+ android:textIsSelectable="true"
android:textAppearance="?android:attr/textAppearanceButton"
android:textColor="@color/mapbox_blue"/>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml
index 26c974dc0d..027f3690d5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_infowindow_content.xml
@@ -23,6 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
+ android:textIsSelectable="true"
android:maxEms="17"
android:textColor="@android:color/black"
android:textSize="18sp"
@@ -34,13 +35,13 @@
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginTop="2dp"
+ android:textIsSelectable="true"
android:lineSpacingExtra="1dp"
android:maxEms="17"
android:textColor="@color/mapbox_gray"
android:textSize="14sp"/>
<TextView
- android:id="@+id/infowindow_subdescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxEms="17"
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml
index 7e4a079063..51eb46e1d5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/layout/mapbox_view_image_marker.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
+ android:id="@+id/image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@null"/>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
index 63ef42c2c3..68e70e948e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
@@ -3,5 +3,4 @@
<color name="mapbox_gray">#7D7F80</color>
<color name="mapbox_gray_light">#EEEEEE</color>
<color name="mapbox_blue">#1E8CAB</color>
- <color name="mapbox_my_location_ring">@color/mapbox_blue</color>
</resources>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
index 8edbd47c29..1c6a265587 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
@@ -2,17 +2,8 @@
<resources>
<dimen name="mapbox_infowindow_tipview_width">8dp</dimen>
<dimen name="mapbox_infowindow_margin">8dp</dimen>
- <dimen name="mapbox_infowindow_offset">-2dp</dimen>
- <dimen name="mapbox_infowindow_line_width">1.5dp</dimen>
- <dimen name="mapbox_attribution_icon_left_padding">@dimen/mapbox_two_dp</dimen>
- <dimen name="mapbox_attribution_icon_top_padding">@dimen/mapbox_two_dp</dimen>
- <dimen name="mapbox_attribution_icon_right_padding">@dimen/mapbox_two_dp</dimen>
- <dimen name="mapbox_attribution_icon_bottom_padding">@dimen/mapbox_two_dp</dimen>
- <dimen name="mapbox_two_dp">2dp</dimen>
<dimen name="mapbox_four_dp">4dp</dimen>
<dimen name="mapbox_eight_dp">8dp</dimen>
- <dimen name="mapbox_ten_dp">10dp</dimen>
- <dimen name="mapbox_sixteen_dp">16dp</dimen>
<dimen name="mapbox_ninety_two_dp">92dp</dimen>
<dimen name="mapbox_my_locationview_outer_circle">18dp</dimen>
</resources>