frameworks/base
Revision | 248c3ab8323c774d213df75ac528d4ab96107fe4 (tree) |
---|---|
Time | 2016-11-04 05:59:57 |
Author | Sungsoo <sungsoo@goog...> |
Commiter | gitbuildkicker |
DO NOT MERGE) ExifInterface: Provide backward compatibility
ExifInterface.saveAttribute() didn't throw UnsupportedOperationException
before. Use IOException instead of UnsupportedOperationException for
backward compatibility.
Bug: 30936376, Bug: 32068647, Bug: 31319086
Change-Id: Iacc7b4d91d49edd7bece8f2e738a633a91025eca
(cherry picked from commit 7ce9243087b04bce719e1f3d10a14b9b26b8ea81)
@@ -1372,8 +1372,7 @@ public class ExifInterface { | ||
1372 | 1372 | */ |
1373 | 1373 | public void saveAttributes() throws IOException { |
1374 | 1374 | if (!mIsSupportedFile) { |
1375 | - throw new UnsupportedOperationException( | |
1376 | - "ExifInterface only supports saving attributes on JPEG formats."); | |
1375 | + throw new IOException("ExifInterface only supports saving attributes on JPEG formats."); | |
1377 | 1376 | } |
1378 | 1377 | // Keep the thumbnail in memory |
1379 | 1378 | mThumbnailBytes = getThumbnail(); |