summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2018-01-02 11:17:47 +0100
committertobrun <tobrun.van.nuland@gmail.com>2018-01-02 11:17:47 +0100
commitcafba6da76ea7467202380cd75b90ff2d1be5a74 (patch)
treee36a40c68394fa39cadede60be2684b2089c7f93
parent4709bf0529f3ff68702bbb3435fd87837a7f380b (diff)
downloadqtlocation-mapboxgl-upstream/tvn-local-fix.tar.gz
[android] - use US local when converting between int color and RGBA String.upstream/tvn-local-fix
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
index 9eb9e9fce0..fe164343b5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
@@ -9,6 +9,8 @@ import com.mapbox.mapboxsdk.style.functions.CameraFunction;
import com.mapbox.mapboxsdk.style.expressions.Expression;
import com.mapbox.mapboxsdk.style.functions.Function;
+import java.util.Locale;
+
/**
* Constructs paint/layout properties for Layers
*
@@ -3363,7 +3365,6 @@ public class PropertyFactory {
return new LayoutPropertyValue<>("text-optional", value);
}
-
/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*
@@ -3375,9 +3376,9 @@ public class PropertyFactory {
return new LayoutPropertyValue<>("text-optional", function);
}
- @SuppressLint("DefaultLocale")
public static String colorToRgbaString(@ColorInt int value) {
- return String.format("rgba(%d, %d, %d, %d)", (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
+ return String.format(Locale.US,"rgba(%d, %d, %d, %d)",
+ (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
}
}