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

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

Merge "Round Lat/Long values to three decimals"

parents cf2364ec a3d5a21f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
     In U.S. English this is denoted by a number followed by "MP". E.g. 12.2MP or 8MP. -->
    <string name="metadata_dimensions_display"><xliff:g id="width" example="1280">%1$d</xliff:g> x <xliff:g id="height" example="1024">%2$d</xliff:g> - <xliff:g id="megapixels" example="12.2">%3$,.1f</xliff:g>MP</string>
    <!--The location of where a photo was taken. (i.e. latitude, longitude) Note that this is probably camera EXIF data.-->
    <string name="metadata_location">Location</string>
    <string name="metadata_coordinates">Coordinates</string>
    <!--The elevation the photo was taken. Note that this is probably camera EXIF data.-->
    <string name="metadata_altitude">Altitude</string>
    <!--The company that made the camera the photo was taken on. Note that this is probably camera EXIF data.-->
+2 −2
Original line number Diff line number Diff line
@@ -102,14 +102,14 @@ public class MediaView extends TableView implements MediaDisplay {
        if (MetadataUtils.hasExifGpsFields(tags)) {
            double[] coords = MetadataUtils.getExifGpsCoords(tags);
            if (geoClickListener != null) {
                table.put(R.string.metadata_location,
                table.put(R.string.metadata_coordinates,
                        String.valueOf(coords[0]) + ",  " + String.valueOf(coords[1]),
                        view -> {
                            geoClickListener.run();
                        }
                );
            } else {
                table.put(R.string.metadata_location,
                table.put(R.string.metadata_coordinates,
                        String.valueOf(coords[0]) + ",  " + String.valueOf(coords[1]));
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ final class MetadataUtils {
        String latRef = exif.getString(ExifInterface.TAG_GPS_LATITUDE_REF);
        String lonRef = exif.getString(ExifInterface.TAG_GPS_LONGITUDE_REF);

        double round = 1000000.0;
        double round = 1000.0;

        double[] coordinates = new double[2];

+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public class MediaViewTest {

        mTable.assertHasRow(R.string.metadata_dimensions, "3840 x 2160, 8.3MP");
        mTable.assertHasRow(R.string.metadata_date_time, "Jan 01, 1970, 12:16 AM");
        mTable.assertHasRow(R.string.metadata_location, "33.995918,  -118.475342");
        mTable.assertHasRow(R.string.metadata_coordinates, "33.996,  -118.475");
        mTable.assertHasRow(R.string.metadata_altitude, "1244.0");
        mTable.assertHasRow(R.string.metadata_make, "Google");
        mTable.assertHasRow(R.string.metadata_model, "Pixel");