summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungsoo <sungsoo@google.com>2016-10-13 12:24:16 +0900
committerFeng Yu <feny@google.com>2016-10-13 20:48:37 +0000
commit761bcb5ad2dd3168109009a31328643f556decba (patch)
tree918240ebace67683e42358c9d132acd64f6ef7dd
parente1c41ca44950883b506e3ec76d403620c193b759 (diff)
downloadbase-761bcb5ad2dd3168109009a31328643f556decba.tar.gz
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
-rw-r--r--media/java/android/media/ExifInterface.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index a2ccdc855988..e3beb4a22b6e 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -1372,8 +1372,7 @@ public class ExifInterface {
*/
public void saveAttributes() throws IOException {
if (!mIsSupportedFile) {
- throw new UnsupportedOperationException(
- "ExifInterface only supports saving attributes on JPEG formats.");
+ throw new IOException("ExifInterface only supports saving attributes on JPEG formats.");
}
// Keep the thumbnail in memory
mThumbnailBytes = getThumbnail();