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

Commit faecc3f8 authored by Insun Kang's avatar Insun Kang Committed by Android (Google) Code Review
Browse files

Merge "ExifInterface: Code clean up" into nyc-dev

parents 2edfe010 8884af3e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -235,8 +235,6 @@ public class ExifInterface {
    public static final String TAG_SPECTRAL_SENSITIVITY = "SpectralSensitivity";
    /** Type is int. */
    public static final String TAG_SUBSEC_TIME = "SubSecTime";
    /** Type is int. @hide */
    public static final String TAG_SUBSECTIME = "SubSecTime";
    /** Type is int. */
    public static final String TAG_SUBSEC_TIME_DIGITIZED = "SubSecTimeDigitized";
    /** Type is int. */
@@ -447,7 +445,7 @@ public class ExifInterface {
            new ExifTag(TAG_F_NUMBER, 33437),
            new ExifTag(TAG_EXPOSURE_PROGRAM, 34850),
            new ExifTag(TAG_SPECTRAL_SENSITIVITY, 34852),
            new ExifTag(TAG_ISO, 34855),
            new ExifTag(TAG_ISO_SPEED_RATINGS, 34855),
            new ExifTag(TAG_OECF, 34856),
            new ExifTag(TAG_EXIF_VERSION, 36864),
            new ExifTag(TAG_DATETIME_ORIGINAL, 36867),
@@ -1161,7 +1159,7 @@ public class ExifInterface {
            if (datetime == null) return -1;
            long msecs = datetime.getTime();

            String subSecs = getAttribute(TAG_SUBSECTIME);
            String subSecs = getAttribute(TAG_SUBSEC_TIME);
            if (subSecs != null) {
                try {
                    long sub = Long.valueOf(subSecs);
@@ -1553,7 +1551,7 @@ public class ExifInterface {
        convertToDouble(TAG_EXPOSURE_TIME);
        convertToDouble(TAG_F_NUMBER);
        convertToDouble(TAG_SUBJECT_DISTANCE);
        convertToInt(TAG_ISO);
        convertToInt(TAG_ISO_SPEED_RATINGS);
        convertToDouble(TAG_EXPOSURE_BIAS_VALUE);
        convertToInt(TAG_WHITE_BALANCE);
        convertToInt(TAG_LIGHT_SOURCE);
+4 −4
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public class ExifInterfaceTest extends AndroidTestCase {
    private static final String[] EXIF_TAGS = {
            ExifInterface.TAG_MAKE,
            ExifInterface.TAG_MODEL,
            ExifInterface.TAG_APERTURE,
            ExifInterface.TAG_F_NUMBER,
            ExifInterface.TAG_DATETIME,
            ExifInterface.TAG_EXPOSURE_TIME,
            ExifInterface.TAG_FLASH,
@@ -77,7 +77,7 @@ public class ExifInterfaceTest extends AndroidTestCase {
            ExifInterface.TAG_GPS_TIMESTAMP,
            ExifInterface.TAG_IMAGE_LENGTH,
            ExifInterface.TAG_IMAGE_WIDTH,
            ExifInterface.TAG_ISO,
            ExifInterface.TAG_ISO_SPEED_RATINGS,
            ExifInterface.TAG_ORIENTATION,
            ExifInterface.TAG_WHITE_BALANCE
    };
@@ -288,7 +288,7 @@ public class ExifInterfaceTest extends AndroidTestCase {
        // Checks values.
        assertStringTag(exifInterface, ExifInterface.TAG_MAKE, expectedValue.make);
        assertStringTag(exifInterface, ExifInterface.TAG_MODEL, expectedValue.model);
        assertFloatTag(exifInterface, ExifInterface.TAG_APERTURE, expectedValue.aperture);
        assertFloatTag(exifInterface, ExifInterface.TAG_F_NUMBER, expectedValue.aperture);
        assertStringTag(exifInterface, ExifInterface.TAG_DATETIME, expectedValue.datetime);
        assertFloatTag(exifInterface, ExifInterface.TAG_EXPOSURE_TIME, expectedValue.exposureTime);
        assertFloatTag(exifInterface, ExifInterface.TAG_FLASH, expectedValue.flash);
@@ -308,7 +308,7 @@ public class ExifInterfaceTest extends AndroidTestCase {
        assertStringTag(exifInterface, ExifInterface.TAG_GPS_TIMESTAMP, expectedValue.gpsTimestamp);
        assertIntTag(exifInterface, ExifInterface.TAG_IMAGE_LENGTH, expectedValue.imageLength);
        assertIntTag(exifInterface, ExifInterface.TAG_IMAGE_WIDTH, expectedValue.imageWidth);
        assertStringTag(exifInterface, ExifInterface.TAG_ISO, expectedValue.iso);
        assertStringTag(exifInterface, ExifInterface.TAG_ISO_SPEED_RATINGS, expectedValue.iso);
        assertIntTag(exifInterface, ExifInterface.TAG_ORIENTATION, expectedValue.orientation);
        assertIntTag(exifInterface, ExifInterface.TAG_WHITE_BALANCE, expectedValue.whiteBalance);
    }