summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSungsoo <sungsoo@google.com>2016-10-13 12:24:16 +0900
committerChristopher R. Palmer <crpalmer@gmail.com>2017-02-03 20:27:31 -0500
commit26ff86c566c81a37209a80652ab533153aead79e (patch)
tree0f9d21415446a88586f19a5d27963c8b3e931995
parentef8dca814466776553100c5c51d16f7026eb8c88 (diff)
downloadframeworks_base-26ff86c566c81a37209a80652ab533153aead79e.zip
frameworks_base-26ff86c566c81a37209a80652ab533153aead79e.tar.gz
frameworks_base-26ff86c566c81a37209a80652ab533153aead79e.tar.bz2
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.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 bb75547..2c7160f 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -1374,8 +1374,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();