Skip to content

Commit

Permalink
Fix FC if the locale was European
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
  • Loading branch information
franciscofranco committed Mar 17, 2016
1 parent 1c027ab commit 0212dc2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static float[] computeHSV(AmbientLightSensorChange sensor, Object mutativ
Color.RGBToHSV(red, green, blue, hsv);

// 'magic' algorithm
float div = Float.valueOf(String.format(Locale.getDefault(), "%.2f",
float div = Float.valueOf(String.format(Locale.US, "%.2f",
sensor.getLight() / ((int) SensorManager.LIGHT_OVERCAST >> 1)));

if (div > HIGH_THRESHOLD) {
Expand Down

0 comments on commit 0212dc2

Please sign in to comment.