diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2018-10-04 19:21:53 -0600 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2018-10-18 14:32:51 -0600 |
| commit | 4e5efa31864121326a1c6796c2b8e54492aad179 (patch) | |
| tree | a380dbd18cf02c63d3f77720f2ea74aa3944dd0b /docs/html/sdk/api_diff/24/changes | |
| parent | 47bf6668dc22ee79db15bd9fb1676f81a0251472 (diff) | |
Convenience method for obtaining thumbnails.
Obtaining a thumbnail for a Uri requires opening it with the slightly
obscure openTypedAssetFileDescriptor(), passing in "image/*" with the
right Bundle of EXTRA_SIZE to hint the target area on screen, and
defensively scaling any returned results.
This is pretty tedious to get right, so offer a convenience method
that does all this for the developer. Internally uses ImageDecoder
to follow best-practices, and replaces older getDocumentThumbnail()
implementation by delegating to this one.
A future CL will teach ImageDecoder about how to read any embedded
EXIF thumbnails, including any required rotation.
Bug: 111268862
Test: atest FrameworksCoreTests:android.content.ContentResolverTest
Change-Id: I5c9c09ddf9b480f3b5c6ade0a078cccb68de2f2b
Diffstat (limited to 'docs/html/sdk/api_diff/24/changes')
0 files changed, 0 insertions, 0 deletions
