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

Commit 26ff5d3b authored by Steve McKay's avatar Steve McKay
Browse files

Revert "Add DocsUI Support for Focal Length/ISO"

This reverts commit c6678536.

Reason for revert: https://b.corp.google.com/issues/64373356

I've verified locally that this CL causes the bug. But on the surface I can't tell how. Since this is blocking enabling presubmit on master, reverting. We can work out the cause later today and resubmit.

Test: Presubmit (small and medium) passing locally.
Change-Id: Ic5e9de69012e40dd73ac91774d9552a8b8cc44da
parent 27f1c90e
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -67,15 +67,6 @@
    <string name="metadata_duration">Duration</string>
    <!-- When a photo was taken. Note that this is probably camera EXIF data.-->
    <string name="metadata_date_time">Taken on</string>
    <!--The tag for the focal length of a camera. Note that this is probably camera EXIF data-->
    <string name="metadata_focal_length">Focal length</string>
    <!--The format for displaying the focal length of a camera. Note that this is probably camera EXIF data-->
    <string name="metadata_focal_format"><xliff:g id="length" example="4.67mm">%1$,.2f</xliff:g>mm</string>
    <!--The tag for the ISO Speed of a camera. Note that this is probably camera EXIF data-->
    <string name="metadata_iso_speed_ratings">ISO Speed</string>
    <!--The format for displaying ISO speed. Note that this is probably camera EXIF data-->
    <string name="metadata_iso_format">ISO <xliff:g id="iso_speed" example="200">%1$d</xliff:g></string>

    <!-- Message presenting EXIF aperture information in the tradition "f/2.0" format familiar to users. This format is basically an industry standard that shouldn't be translated, so it is marked as not translatable. -->
    <string name="metadata_aperture_format" translatable="false">f/<xliff:g id="aperture" example="2.0">%1$,.1f</xliff:g></string>

+0 −12
Original line number Diff line number Diff line
@@ -138,18 +138,6 @@ public class MediaView extends TableView implements MediaDisplay {
                    formatShutterSpeed(tags.getDouble(ExifInterface.TAG_SHUTTER_SPEED_VALUE)));
            table.put(R.string.metadata_shutter_speed, shutterSpeed);
        }

        if (tags.containsKey(ExifInterface.TAG_FOCAL_LENGTH)) {
            float length = (float) tags.getDouble(ExifInterface.TAG_FOCAL_LENGTH);
            table.put(R.string.metadata_focal_length,
                    String.format(resources.getString(R.string.metadata_focal_format), length));
        }

        if (tags.containsKey(ExifInterface.TAG_ISO_SPEED_RATINGS)) {
            int iso = tags.getInt(ExifInterface.TAG_ISO_SPEED_RATINGS);
            table.put(R.string.metadata_iso_speed_ratings,
                    String.format(resources.getString(R.string.metadata_iso_format), iso));
        }
    }

    private static void showCoordiantes(
+0 −4
Original line number Diff line number Diff line
@@ -59,8 +59,6 @@ public class MediaViewTest {
     */
    @Test
    public void testShowExifData() throws Exception {
        mResources.strings.put(R.string.metadata_iso_format, "ISO %s");
        mResources.strings.put(R.string.metadata_focal_format, "%d mm");
        mResources.strings.put(R.string.metadata_aperture_format, "f/%.1f");
        Bundle exif = mMetadata.getBundle(DocumentsContract.METADATA_EXIF);
        MediaView.showExifData(mTable, mResources, TestEnv.FILE_JPG, exif, null);
@@ -72,8 +70,6 @@ public class MediaViewTest {
        mTable.assertHasRow(R.string.metadata_camera, "Google Pixel");
        mTable.assertHasRow(R.string.metadata_shutter_speed, "1/100");
        mTable.assertHasRow(R.string.metadata_aperture, "f/2.0");
        mTable.assertHasRow(R.string.metadata_focal_length, "8.00mm");
        mTable.assertHasRow(R.string.metadata_iso_speed_ratings, "ISO 120");
    }

    /**
+12 −15
Original line number Diff line number Diff line
@@ -29,21 +29,18 @@ final class TestMetadata {
        Bundle data = new Bundle();
        container.putBundle(DocumentsContract.METADATA_EXIF, data);

        Bundle exif = new Bundle();
        exif.putInt(ExifInterface.TAG_IMAGE_WIDTH, 3840);
        exif.putInt(ExifInterface.TAG_IMAGE_LENGTH, 2160);
        exif.putString(ExifInterface.TAG_DATETIME, "Jan 01, 1970, 12:16 AM");
        exif.putString(ExifInterface.TAG_GPS_LATITUDE, "33/1,59/1,4530/100");
        exif.putString(ExifInterface.TAG_GPS_LONGITUDE, "118/1,28/1,3124/100");
        exif.putString(ExifInterface.TAG_GPS_LATITUDE_REF, "N");
        exif.putString(ExifInterface.TAG_GPS_LONGITUDE_REF, "W");
        exif.putDouble(ExifInterface.TAG_GPS_ALTITUDE, 1244);
        exif.putString(ExifInterface.TAG_MAKE, "Google");
        exif.putString(ExifInterface.TAG_MODEL, "Pixel");
        exif.putDouble(ExifInterface.TAG_SHUTTER_SPEED_VALUE, 6.643);
        exif.putDouble(ExifInterface.TAG_APERTURE, 2.0);
        exif.putDouble(ExifInterface.TAG_FOCAL_LENGTH, 8.0);
        exif.putInt(ExifInterface.TAG_ISO_SPEED_RATINGS, 120);
        data.putInt(ExifInterface.TAG_IMAGE_WIDTH, 3840);
        data.putInt(ExifInterface.TAG_IMAGE_LENGTH, 2160);
        data.putString(ExifInterface.TAG_DATETIME, "Jan 01, 1970, 12:16 AM");
        data.putString(ExifInterface.TAG_GPS_LATITUDE, "33/1,59/1,4530/100");
        data.putString(ExifInterface.TAG_GPS_LONGITUDE, "118/1,28/1,3124/100");
        data.putString(ExifInterface.TAG_GPS_LATITUDE_REF, "N");
        data.putString(ExifInterface.TAG_GPS_LONGITUDE_REF, "W");
        data.putDouble(ExifInterface.TAG_GPS_ALTITUDE, 1244);
        data.putString(ExifInterface.TAG_MAKE, "Google");
        data.putString(ExifInterface.TAG_MODEL, "Pixel");
        data.putDouble(ExifInterface.TAG_SHUTTER_SPEED_VALUE, 6.643);
        data.putDouble(ExifInterface.TAG_APERTURE, 2.0);
    }

    static void populateVideoData(Bundle container) {
+1 −1

File changed.

Contains only whitespace changes.