OSDN Git Service

DO NOT MERGE) ExifInterface: Provide backward compatibility
authorSungsoo <sungsoo@google.com>
Thu, 13 Oct 2016 03:24:16 +0000 (12:24 +0900)
committerSungsoo Lim <sungsoo@google.com>
Thu, 13 Oct 2016 03:28:16 +0000 (03:28 +0000)
ExifInterface.saveAttribute() didn't throw UnsupportedOperationException
before. Use IOException instead of UnsupportedOperationException for
backward compatibility.

Bug: 30936376, Bug: 32068647, Bug: 31319086
Change-Id: Iacc7b4d91d49edd7bece8f2e738a633a91025eca

media/java/android/media/ExifInterface.java

index d51dbda..532368f 100644 (file)
@@ -1367,8 +1367,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();