applied suggestions from reviewers:

reorder puFloat and getFload, and removing additional constructor
This commit is contained in:
Everton Hermann 2020-07-19 17:40:45 +02:00
parent 743eaf19d0
commit e87ed289c7
2 changed files with 4 additions and 7 deletions

View file

@ -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) {

View file

@ -11,9 +11,6 @@ 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;
@ -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() {