From 117993ca336d82d95c4564f82b3a7a699ceece73 Mon Sep 17 00:00:00 2001 From: Olga Khlopkova Date: Wed, 20 May 2020 18:43:09 +0300 Subject: [PATCH] [Android] Fix for arrow rotation in not-default screen orientation. --- android/src/com/mapswithme/util/LocationUtils.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/android/src/com/mapswithme/util/LocationUtils.java b/android/src/com/mapswithme/util/LocationUtils.java index 4e1bc495cb..c436e82296 100644 --- a/android/src/com/mapswithme/util/LocationUtils.java +++ b/android/src/com/mapswithme/util/LocationUtils.java @@ -35,6 +35,8 @@ public class LocationUtils double correction = 0; switch (displayOrientation) { + case Surface.ROTATION_0: + return angle; case Surface.ROTATION_90: correction = Math.PI / 2.0; break; @@ -46,11 +48,7 @@ public class LocationUtils break; } - // negative values (like -1.0) should remain negative (indicates that no direction available) - if (angle >= 0.0) - angle = correctAngle(angle, correction); - - return angle; + return correctAngle(angle, correction); } public static double correctAngle(double angle, double correction)