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

Commit ad91dc5d authored by Jin Seok Park's avatar Jin Seok Park Committed by android-build-merger
Browse files

Merge "Catch OutOfMemoryError and log warning" into qt-dev am: f66a0737 am: 49d3fb77

am: e57d4841

Change-Id: I2651c127868f4496faf346a812bc935a66cc442f
parents a26e4cc0 e57d4841
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1794,15 +1794,13 @@ public class ExifInterface {
            // Set thumbnail image offset and length
            setThumbnailData(inputStream);
            mIsSupportedFile = true;
        } catch (IOException e) {
        } catch (IOException | OutOfMemoryError e) {
            // Ignore exceptions in order to keep the compatibility with the old versions of
            // ExifInterface.
            mIsSupportedFile = false;
            if (DEBUG) {
                Log.d(TAG, "Invalid image: ExifInterface got an unsupported image format file"
            Log.w(TAG, "Invalid image: ExifInterface got an unsupported image format file"
                    + "(ExifInterface supports JPEG and some RAW image formats only) "
                    + "or a corrupted JPEG file to ExifInterface.", e);
            }
        } finally {
            addDefaultValuesForCompatibility();