Disable support for object references.

MediaProvider has standardized on being an indexed view of files that
we discover on disk, so that we can always recover that indexed
information in case of user data wipe or corruption.  This means
that MediaProvider no longer supports abstract "object references".

This doesn't prevent future MTP implementations from bringing back
object reference support, and the recommended path forward would
be to have MtpDatabase convert object references into playlist files
that are written to disk.  MediaProvider will then gladly scan those
playlist files to be visible to users.

Shift to directly using the existing Files.getContentUri() API for
all MediaProvider interactions.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ib9513867c5074d1553b70fc7f188bfd594dcb52d
gugelfrei
Jeff Sharkey 5 years ago
parent 231698afc6
commit b8d374b9e2

@ -84,8 +84,8 @@ static const MtpOperationCode kSupportedOperationCodes[] = {
// MTP_OPERATION_SET_OBJECT_PROP_LIST,
// MTP_OPERATION_GET_INTERDEPENDENT_PROP_DESC,
// MTP_OPERATION_SEND_OBJECT_PROP_LIST,
MTP_OPERATION_GET_OBJECT_REFERENCES,
MTP_OPERATION_SET_OBJECT_REFERENCES,
// MTP_OPERATION_GET_OBJECT_REFERENCES,
// MTP_OPERATION_SET_OBJECT_REFERENCES,
// MTP_OPERATION_SKIP,
// Android extension for direct file IO
MTP_OPERATION_GET_PARTIAL_OBJECT_64,

Loading…
Cancel
Save