Use MediaStore thumbnails in PhotoPicker

PhotoPicker shows slowness in loading thumbnails for videos. In some
devices, this may take 5-10s to load video thumbnail. Since, MediaStore
cache already has pre-extracted thumbnails for videos, use these
thumbnails for video thumbnails in the Photo grid. This change will also
make PhotoPicker to reuse MediaStore thumbnail cache for images.

For video preview we show a video thumbnail until the video playback
is ready. For this, we don't use MediaStore thumbnail cache because
MediaProvider thumbnail extraction fetches frames from the middle of the
video, meanwhile the requirement is to fetch frames from the start of the video.

Bug: 228958289
Test: Manual. Verified that video thumbnail loading is faster.
Change-Id: I244e7df43cdb5888b7f29089a77d73a553b973dd
5 files changed