From bd6f894adb2e77120b50199ae471a2e86443723f Mon Sep 17 00:00:00 2001 From: Sam Judd Date: Tue, 5 Nov 2019 10:22:59 -0800 Subject: [PATCH] Switch to the support library version of ExifInterface Fixes #3851. PiperOrigin-RevId: 278655542 --- library/build.gradle | 1 + .../resource/bitmap/ExifInterfaceImageHeaderParser.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/library/build.gradle b/library/build.gradle index 87df5b6ffa..18a4e61ac9 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -14,6 +14,7 @@ dependencies { api project(':annotation') api "androidx.fragment:fragment:${ANDROID_X_VERSION}" api "androidx.vectordrawable:vectordrawable-animated:${ANDROID_X_VERSION}" + api "androidx.exifinterface:exifinterface:${ANDROID_X_VERSION}" compileOnly "androidx.appcompat:appcompat:${ANDROID_X_VERSION}" if (project.plugins.hasPlugin('net.ltgt.errorprone')) { diff --git a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ExifInterfaceImageHeaderParser.java b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ExifInterfaceImageHeaderParser.java index 630b08170c..6cf65f1f86 100644 --- a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ExifInterfaceImageHeaderParser.java +++ b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/ExifInterfaceImageHeaderParser.java @@ -1,9 +1,9 @@ package com.bumptech.glide.load.resource.bitmap; -import android.media.ExifInterface; import android.os.Build; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; +import androidx.exifinterface.media.ExifInterface; import com.bumptech.glide.load.ImageHeaderParser; import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool; import com.bumptech.glide.util.ByteBufferUtil; @@ -24,13 +24,13 @@ public final class ExifInterfaceImageHeaderParser implements ImageHeaderParser { @NonNull @Override - public ImageType getType(@NonNull InputStream is) throws IOException { + public ImageType getType(@NonNull InputStream is) { return ImageType.UNKNOWN; } @NonNull @Override - public ImageType getType(@NonNull ByteBuffer byteBuffer) throws IOException { + public ImageType getType(@NonNull ByteBuffer byteBuffer) { return ImageType.UNKNOWN; }