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

Commit bc83e829 authored by Ray Essick's avatar Ray Essick Committed by Automerger Merge Worker
Browse files

Merge "Revert "Use a ExifInterface ctor with a file descriptor as a...

Merge "Revert "Use a ExifInterface ctor with a file descriptor as a parameter"" am: af1f86b3 am: cf76673a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2617930



Change-Id: I6ba4d2aac6244cddb51c0da2c3b190d9ab52a43d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c2c81349 cf76673a
Loading
Loading
Loading
Loading
+11 −14
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import com.android.internal.util.ArrayUtils;
import libcore.io.IoUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
@@ -256,8 +255,7 @@ public class ThumbnailUtils {

        // get orientation
        if (MediaFile.isExifMimeType(mimeType)) {
            try (FileInputStream is = new FileInputStream(file)) {
                exif = new ExifInterface(is.getFD());
            exif = new ExifInterface(file);
            switch (exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 0)) {
                case ExifInterface.ORIENTATION_ROTATE_90:
                    orientation = 90;
@@ -270,7 +268,6 @@ public class ThumbnailUtils {
                    break;
            }
        }
        }

        if (mimeType.equals("image/heif")
                || mimeType.equals("image/heif-sequence")