Skip to content

Commit bd6f894

Browse files
sjuddglide-copybara-robot
authored andcommittedNov 5, 2019
Switch to the support library version of ExifInterface
Fixes #3851. PiperOrigin-RevId: 278655542
1 parent d40198e commit bd6f894

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎library/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies {
1414
api project(':annotation')
1515
api "androidx.fragment:fragment:${ANDROID_X_VERSION}"
1616
api "androidx.vectordrawable:vectordrawable-animated:${ANDROID_X_VERSION}"
17+
api "androidx.exifinterface:exifinterface:${ANDROID_X_VERSION}"
1718
compileOnly "androidx.appcompat:appcompat:${ANDROID_X_VERSION}"
1819

1920
if (project.plugins.hasPlugin('net.ltgt.errorprone')) {

‎library/src/main/java/com/bumptech/glide/load/resource/bitmap/ExifInterfaceImageHeaderParser.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.bumptech.glide.load.resource.bitmap;
22

3-
import android.media.ExifInterface;
43
import android.os.Build;
54
import androidx.annotation.NonNull;
65
import androidx.annotation.RequiresApi;
6+
import androidx.exifinterface.media.ExifInterface;
77
import com.bumptech.glide.load.ImageHeaderParser;
88
import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool;
99
import com.bumptech.glide.util.ByteBufferUtil;
@@ -24,13 +24,13 @@ public final class ExifInterfaceImageHeaderParser implements ImageHeaderParser {
2424

2525
@NonNull
2626
@Override
27-
public ImageType getType(@NonNull InputStream is) throws IOException {
27+
public ImageType getType(@NonNull InputStream is) {
2828
return ImageType.UNKNOWN;
2929
}
3030

3131
@NonNull
3232
@Override
33-
public ImageType getType(@NonNull ByteBuffer byteBuffer) throws IOException {
33+
public ImageType getType(@NonNull ByteBuffer byteBuffer) {
3434
return ImageType.UNKNOWN;
3535
}
3636

1 commit comments

Comments
 (1)

kangshifu commented on Jan 2, 2020

@kangshifu

which version should i use it ?

Please sign in to comment.