| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Under the new MtpStorageManager design,
media info like MP3 Track title, album and artist, Genre, etc
can not be retrieved via MTP
by Windows Media Player, Linux Rhythmbox and Some Car Kits
Bug: 112635346
Test: atest MtpTests
Test: atest MediaProviderTests
Test: Manual test: Windows Media Player
Change-Id: I57a947fe6d3a583a0990be5bd2b0678f39d948f2
|
| |
|
|
|
|
|
|
|
|
| |
The MediaStore.VOLUME_EXTERNAL volume is a merged view of all storage
devices, and clients working on a specific volume need to focus on
the volume they're interested in.
Bug: 129840030
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I91cee6a96d7f9360e6a93a9a3c389b097b6b9967
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're now enforcing the public API schema, so clients like MTP need
to query specific collections when asking for properties that are
specific to those media types.
Also refactor MediaScanner calls to go through MediaProvider, so
they can be handled by ModernMediaScanner. We no longer directly
try inserting items, and instead rely completely on the scanner.
Bug: 127625964, 122263824
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic86982766606a619afafe725f9c60013a5671840
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MtpStorageManager keeps track of file information and
send notifications for new files. MtpDatabase now uses
this instead of MediaProvider for getting object information,
although some operations are still reflected into MP.
Since MtpStorageManager handles storage ids, remove
that field from StorageVolume and VolumeInfo.
Clean up a lot of the jni code for MtpDatabase.
Bug: 63143623
Test: Test every MtpOperation in a variety of situations on Linux and
Windows. Also use the shell to manipulate files. Verify that the cache
is consistent throughout, and the operations behave as expected. Verify
files created by the shell appear.
Test: adb shell am instrument -w android.mtp /android.support.test.runner.AndroidJUnitRunner
Change-Id: Id4ea810047b0c323399cd833047733e5daafb30a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.
This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage. Older release()
methods are deprecated in favor of close().
Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation. Switch
MediaScanner and friends to use public API instead of raw AIDL calls.
Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In change Ic5b3fb75309893caae1a4f4b56068a543847f1f7, we added partial
support for the MTP properties:
MTP_PROPERTY_AUDIO_WAVE_CODE,
MTP_PROPERTY_BITRATE_TYPE
MTP_PROPERTY_AUDIO_BITRATE
MTP_PROPERTY_NUMBER_OF_CHANNELS
MTP_PROPERTY_SAMPLE_RATE
However we were not returning any values for these properties in the result
of the MTP GetObjectPropList command. Strangely, this triggers a nasty bug
in Windows 7 that results in data loss. When copying a directory containing
several MP3 files from one location on the device to another, Windows will
copy only some of the files to the new location, but delete all of the originals.
Finishing the implementation of these new object properties for some unknown
reason stops this bad behavior in Windows 7.
Bug: 19018427
Change-Id: I5fd3b91a89b31827d3100686445cef6795fe0f3f
|
| |
|
|
| |
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).
Also implement tracking of read/write ops on contacts and the
call log. This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service. The contacts provider and call
log provider turn this on for themselves.
This also implements some of the mechanics of being able to ignore
incoming provider calls... all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).
Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object. The application
creates a CancelationSignal object and passes it as an argument
to the query. The cancelation signal can then be used to cancel
the query while it is executing.
If the cancelation signal is raised before the query is executed,
then it is immediately terminated.
Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
|
| |
|
|
|
|
|
| |
Bug: 4561836
Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- MTP support for multiple storage units
- Add storage_id column to media database for MTP storage ID
- Add framework resource for defining mount points and user visible descriptions
for multiple volumes
- Clean up locking in MtpServer JNI code
Change-Id: Iffb66ed156ef5bc80b14228af78fbacee7734360
|
| |
|
|
|
| |
Change-Id: I65fbd3f2f62724434136c6ae310e6647884902d2
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
|
|
|
| |
Change-Id: I1f31971c4c777462f485e52fac016dc0fff48ad9
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
|
|
|
|
|
|
|
|
| |
Make sure previous MtpThread has exited before starting another to avoid
EBUSY opening MTP kernel driver.
BUG: 3317803
Change-Id: I81dcbac42bcf5f680ed1b1469839bc0b0e49d53d
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
|
Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
|