diff --git a/library/src/main/java/com/bumptech/glide/load/data/ParcelFileDescriptorRewinder.java b/library/src/main/java/com/bumptech/glide/load/data/ParcelFileDescriptorRewinder.java index bd2be60a40..0f7c5f3c2c 100644 --- a/library/src/main/java/com/bumptech/glide/load/data/ParcelFileDescriptorRewinder.java +++ b/library/src/main/java/com/bumptech/glide/load/data/ParcelFileDescriptorRewinder.java @@ -18,8 +18,9 @@ public final class ParcelFileDescriptorRewinder implements DataRewinder= Build.VERSION_CODES.LOLLIPOP; + // Os.lseek() is only supported on API 21+ and does not work in Robolectric. + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP + && !"robolectric".equals(Build.FINGERPRINT); } @RequiresApi(Build.VERSION_CODES.LOLLIPOP)