Age | Commit message (Collapse) | Author |
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/MediaProvider/+/26818307
Change-Id: I6192aa4e95d71f406bdaac645b337e49f651a2b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Added jni code to perform leveldb operations. Test is executed in fake
mediaprovider and leveldb library is loaded for the same.
Test: atest com.android.providers.media.leveldb.LevelDBProxyTest
Bug: 336793168
Change-Id: Ib9821430d7494118ab3328efc317cb7f33082491
|
|
Remove keep rules for providers.
Providers that are listed in a manifest get keep rules automatically
generated by aapt.
Providers that are not listed in a manifest are unreachable dead code
and shouldn't be kept.
Replace keep rules with annotations where applicable.
This change is a cleanup and a functional no-op.
Bug: 248580093
Change-Id: Iecfd561e9ede918dcf44e57d2ea60084ed2f01de
|
|
The MediaMetadataRetriever (MMR) attempts to convert any legacy fds
obtained from a modern fd back to a modern fd. Access control is
implemented in the FuseDaemon by checking if the caller has an fd from
the FUSE fs and if so, it simply re-opens the associated file path and
returns the original (modern) fd to the caller.
The previous implementation was conservative and always opened a
redacted fd if an equivalent fd was found on the FUSE fs.
This breaks MMR location metadata access because location will always
be redacted when the data source is a file path or fd because the FUSE
fs will have an equivalent fd by the time convertToModernFd is called.
Now, we retrieve the redaction state of the equivalent opened FUSE fd
and use that to open the returned modern fd.
Test: atest TranscodeTest && atest fuse_node_test
Bug: 205749245
Change-Id: I45670dff4e5348a3b07bf423cd1465c328ad79ea
|
|
Previously, proguard.flags included everything under
com.android.providers.media package. By adding specific filters for
classes which are entry points to the code, we let proguard
shrink more classes and class members.
This reduces the apex size from 9.5M to 9.1M.
Bug: 213860923
Test: du -sh out/dist/com.google.android.mediaprovider.apex
Change-Id: Ib8ed4cdcc885b988e1185f972eeb397f11397422
|
|
By default, glide calls into CloudMediaProvider#openTypedAssetFileDescriptor without Bundle
params which internally calls CloudMediaProvider#onOpenFile and that
results in download of entire file even during thumbnail loading. Hence
we need a custom glide model loader which passes Bundle params into
CloudMediaProvider#openTypedAssetFileDescriptor so that
CloudMediaProvider#onOpenThumbnail gets called, which downloads just the
thumbnail instead of the original media file.
Test: Manually tested photo picker with and without cloud media
provider, m
Bug: 195008673
Change-Id: I9d2cc28b0be96d03f193e3d16d467b1b238a9764
Merged-In: I9d2cc28b0be96d03f193e3d16d467b1b238a9764
Change-Id: I4daf03296e16bb907b97bf180983dd045a860a50
Merged-In: I4daf03296e16bb907b97bf180983dd045a860a50
(cherry picked from commit a95ab738f8fd2ab1420d1b2ae7551d9b7b1cff9a)
|
|
The Extensible Metadata Platform (XMP) standard is widely used to
annotate useful information about audio, video, and image files, so
this change starts indexing certain widely-useful fields.
This change only parses XMP metadata from images, and it has several
example files to verify parsing, since we've observed values being
defined as both XML attributes and tags.
Per the docs in a previous CL, only allow XMP to override a MIME
type when the top-level type is in agreement.
Ignore some slower MediaScannerTest tests for now; they were mostly
intended for debugging purposes instead of long-term enforcement.
Bug: 120791890
Test: atest MediaProviderTests
Change-Id: Ifa66efc4bf43174b239c10ac1f95ea032f507b2c
|
|
The platform media scanner has served faithfully for many years, but
it's become tedious to test and maintain, mainly due to the way it
weaves obscurely between managed and native code.
This modern reimplementation is bug-faithful to the legacy scanner,
with tests to confirm that media is scanned identically. Future CLs
will flesh out the remaining features and add additional tests to
confirm behaviors around hiding/showing directories.
Eventually this will also extract XMP metadata from images.
Current benchmarks show legacy performance:
Scan Initial: 5175ms [220, 1, 94, 94]
Scan No-op: 333ms [0, 0, 0, 0]
Scan Clean: 111ms [-191, 0, -93, -93]
Compared with similar modern performance:
Scan Initial: 5822ms [207, 1, 94, 94]
Scan No-op: 331ms [0, 0, 0, 0]
Scan Clean: 170ms [-191, 0, -93, -93]
Bug: 120791890, 122263824, 120862852
Test: atest com.android.providers.media.MediaScannerTest
Change-Id: I938b18f7c6cd5309a6b9c4eb97e635d6151b4ead
|