Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ce92430 authored by Sungsoo's avatar Sungsoo Committed by Sungsoo Lim
Browse files

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
parent 2cd4383c
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1372,8 +1372,7 @@ public class ExifInterface {
     */
     */
    public void saveAttributes() throws IOException {
    public void saveAttributes() throws IOException {
        if (!mIsSupportedFile) {
        if (!mIsSupportedFile) {
            throw new UnsupportedOperationException(
            throw new IOException("ExifInterface only supports saving attributes on JPEG formats.");
                    "ExifInterface only supports saving attributes on JPEG formats.");
        }
        }
        // Keep the thumbnail in memory
        // Keep the thumbnail in memory
        mThumbnailBytes = getThumbnail();
        mThumbnailBytes = getThumbnail();