Merge "ExifInterface: Remove throwing exception" into oc-mr1-dev

This commit is contained in:
Jin Seok Park
2017-08-04 00:43:02 +00:00
committed by Android (Google) Code Review

View File

@@ -2101,9 +2101,7 @@ public class ExifInterface {
private int getMimeType(BufferedInputStream in) throws IOException {
in.mark(SIGNATURE_CHECK_SIZE);
byte[] signatureCheckBytes = new byte[SIGNATURE_CHECK_SIZE];
if (in.read(signatureCheckBytes) != SIGNATURE_CHECK_SIZE) {
throw new EOFException();
}
in.read(signatureCheckBytes);
in.reset();
if (isJpegFormat(signatureCheckBytes)) {
return IMAGE_TYPE_JPEG;