Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom MediaMetadataRetriever shadow in GlideTest #5292

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions library/test/src/test/java/com/bumptech/glide/GlideTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.media.MediaMetadataRetriever;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.view.ViewGroup;
Expand Down Expand Up @@ -83,7 +82,6 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.Shadows;
import org.robolectric.annotation.Config;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
Expand All @@ -98,7 +96,6 @@
sdk = ROBOLECTRIC_SDK,
shadows = {
GlideTest.ShadowFileDescriptorContentResolver.class,
GlideTest.ShadowMediaMetadataRetriever.class,
})
@SuppressWarnings("unchecked")
public class GlideTest {
Expand Down Expand Up @@ -863,16 +860,4 @@ public AssetFileDescriptor openAssetFileDescriptor(Uri uri, String type) {
return URI_TO_FILE_DESCRIPTOR.get(uri);
}
}

@Implements(MediaMetadataRetriever.class)
public static class ShadowMediaMetadataRetriever {

@Implementation
@SuppressWarnings("unused")
public Bitmap getFrameAtTime() {
Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
Shadows.shadowOf(bitmap).appendDescription(" from MediaMetadataRetriever");
return bitmap;
}
}
}
Loading