ExifInterface: Provide backward compatibility am: 2dbe166801 am: bc813cd510

am: 36f64a2f0c

Change-Id: Ibc82a2ddd80dff7d98880db0a179fbb1540ac6f8
This commit is contained in:
Sungsoo
2016-10-13 22:11:58 +00:00
committed by android-build-merger

View File

@@ -1557,16 +1557,13 @@ public class ExifInterface {
* <p> * <p>
* This method is only supported for JPEG files. * This method is only supported for JPEG files.
* </p> * </p>
*
* @throws UnsupportedOperationException If this method is called with unsupported files.
*/ */
public void saveAttributes() throws IOException { public void saveAttributes() throws IOException {
if (!mIsSupportedFile || mIsRaw) { if (!mIsSupportedFile || mIsRaw) {
throw new UnsupportedOperationException( throw new IOException("ExifInterface only supports saving attributes on JPEG formats.");
"ExifInterface only supports saving attributes on JPEG formats.");
} }
if (mIsInputStream || (mSeekableFileDescriptor == null && mFilename == null)) { if (mIsInputStream || (mSeekableFileDescriptor == null && mFilename == null)) {
throw new UnsupportedOperationException( throw new IOException(
"ExifInterface does not support saving attributes for the current input."); "ExifInterface does not support saving attributes for the current input.");
} }