diff options
author | Sungsoo <sungsoo@google.com> | 2016-10-13 12:24:16 +0900 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-11-03 13:59:57 -0700 |
commit | 248c3ab8323c774d213df75ac528d4ab96107fe4 (patch) | |
tree | 2b52baecc670f649df94df97f81188b80a581436 | |
parent | ef525e8d721a69310044eca14993df8b13ac1b14 (diff) | |
download | base-248c3ab8323c774d213df75ac528d4ab96107fe4.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
(cherry picked from commit 7ce9243087b04bce719e1f3d10a14b9b26b8ea81)
-rw-r--r-- | media/java/android/media/ExifInterface.java | 3 |
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(); |