Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5b54c55 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix lat/long rounding error"

parents cb2b63be eb72c556
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -430,8 +430,8 @@ final public class MediaMuxer {
     * @throws IllegalStateException If this method is called after {@link #start}.
     */
    public void setLocation(float latitude, float longitude) {
        int latitudex10000  = (int) (latitude * 10000 + 0.5);
        int longitudex10000 = (int) (longitude * 10000 + 0.5);
        int latitudex10000  = Math.round(latitude * 10000);
        int longitudex10000 = Math.round(longitude * 10000);

        if (latitudex10000 > 900000 || latitudex10000 < -900000) {
            String msg = "Latitude: " + latitude + " out of range.";