applied suggestions from reviewers:
reorder puFloat and getFload, and removing additional constructor
This commit is contained in:
parent
743eaf19d0
commit
e87ed289c7
2 changed files with 4 additions and 7 deletions
|
@ -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) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue