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

am: 48dad606c5

Change-Id: Iba1c71b28bfb2f37939caf157ba41b42903d1149
This commit is contained in:
Jin Seok Park
2017-08-04 00:53:49 +00:00
committed by android-build-merger

View File

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