OSDN Git Service

Add extras to AFD, send orientation metadata.
authorJeff Sharkey <jsharkey@android.com>
Mon, 14 Oct 2013 21:57:33 +0000 (14:57 -0700)
committerJeff Sharkey <jsharkey@android.com>
Mon, 14 Oct 2013 22:28:19 +0000 (15:28 -0700)
commitc1c8f3f97d344a24bfddcb56a8be05e7e2fabe9e
tree378307092542fff53cc3ecd45dc404b5ace63afc
parentb5da7b23df5278a5e722b601eb8ef7e98537a51e
Add extras to AFD, send orientation metadata.

AssetFileDescriptor augments a ParcelFileDescriptor with details
about how it should be interpreted, so extend it to support a Bundle
of extras.  Then use these extras to share thumbnail orientation
metadata.

The raw image data of EXIF thumbnails matches the orientation of
the enclosing image, but the thumbnail data doesn't repeat the EXIF
flags.  This meant that receivers of openDocumentThumbnail() would
get an image that needed to be transformed, but without enough
context to actually transform it.

Instead of transforming and recompressing the image on the fly on
the provider side, send a transformation hint that the receiver
side can interpret.

Bug: 11205688
Change-Id: Ibc5a7ad002377a55e6ffcb5ac5c8829841002e06
api/current.txt
core/java/android/content/res/AssetFileDescriptor.java
core/java/android/provider/DocumentsContract.java
packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java