Skip to content

Commit

Permalink
Do not use MediaStore thumbnail when size is SIZE_ORIGINAL.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170774550
  • Loading branch information
asuszek authored and sjudd committed Oct 3, 2017
1 parent 8a90f54 commit 4501396
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.ContentResolver;
import android.net.Uri;
import android.provider.MediaStore;
import com.bumptech.glide.request.target.Target;

/**
* Utility classes for interacting with the media store.
Expand Down Expand Up @@ -33,6 +34,9 @@ public static boolean isMediaStoreImageUri(Uri uri) {
}

public static boolean isThumbnailSize(int width, int height) {
return width <= MINI_THUMB_WIDTH && height <= MINI_THUMB_HEIGHT;
return width != Target.SIZE_ORIGINAL
&& height != Target.SIZE_ORIGINAL
&& width <= MINI_THUMB_WIDTH
&& height <= MINI_THUMB_HEIGHT;
}
}

0 comments on commit 4501396

Please sign in to comment.