summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2018-01-02 11:17:47 +0100
committerTobrun <tobrun@mapbox.com>2018-01-10 13:14:04 +0100
commited84dca3344b9d53cc60adb49eb92c8b7fd645fc (patch)
tree1e7456ed80ccdf59583ee007bf0dbde8c523e93f
parenta32fddf6ddb923819dc50eed904f7340e904e716 (diff)
downloadqtlocation-mapboxgl-ed84dca3344b9d53cc60adb49eb92c8b7fd645fc.tar.gz
[android] - use US local when converting between int color and RGBA String.
-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 d4ddbe48ef..c43977aec6 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
@@ -8,6 +8,8 @@ import android.support.annotation.ColorInt;
import com.mapbox.mapboxsdk.style.functions.Function;
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
+import java.util.Locale;
+
/**
* Constructs paint/layout properties for Layers
*
@@ -2352,7 +2354,6 @@ public class PropertyFactory {
}
-
/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*
@@ -2364,9 +2365,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);
}
}