diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index cd0ac98783..583915f081 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -302,7 +302,7 @@ public class OsmandAidlApi { zoom = zoom > mapView.getMaxZoom() ? mapView.getMaxZoom() : zoom; zoom = zoom < mapView.getMinZoom() ? mapView.getMinZoom() : zoom; } - if(rotation != Float.NaN) { + if(!Float.isNaN(rotation)) { mapView.setRotate(rotation, false); } if (animated) { diff --git a/OsmAnd/src/net/osmand/aidl/map/SetMapLocationParams.java b/OsmAnd/src/net/osmand/aidl/map/SetMapLocationParams.java index e736fa71b4..788ac784c7 100644 --- a/OsmAnd/src/net/osmand/aidl/map/SetMapLocationParams.java +++ b/OsmAnd/src/net/osmand/aidl/map/SetMapLocationParams.java @@ -11,10 +11,7 @@ public class SetMapLocationParams implements Parcelable { private float rotation; private boolean animated; - public SetMapLocationParams(double latitude, double longitude, int zoom, boolean animated) { - this(latitude, longitude, zoom, Float.NaN, animated); - } - + public SetMapLocationParams(double latitude, double longitude, int zoom, float rotation, boolean animated) { this.latitude = latitude; this.longitude = longitude; @@ -62,16 +59,16 @@ public class SetMapLocationParams implements Parcelable { out.writeDouble(latitude); out.writeDouble(longitude); out.writeInt(zoom); - out.writeFloat(rotation); out.writeByte((byte) (animated ? 1 : 0)); + out.writeFloat(rotation); } private void readFromParcel(Parcel in) { latitude = in.readDouble(); longitude = in.readDouble(); zoom = in.readInt(); - rotation = in.readFloat(); animated = in.readByte() != 0; + rotation = in.readFloat(); } public int describeContents() {