summaryrefslogtreecommitdiff
path: root/media/java/android/mtp/MtpPropertyGroup.java
Commit message (Collapse)AuthorAgeFilesLines
* MTP: media info can not be retrieved via MTP#2James Wei2020-05-011-0/+6
| | | | | | | | | | | | | 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
* Adjust MTP to reference by specific volume name.Jeff Sharkey2019-04-171-10/+5
| | | | | | | | | | 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
* Query specific collections for properties.Jeff Sharkey2019-03-241-61/+5
| | | | | | | | | | | | | | | 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
* Add MtpStorageManager for monitoring filesystem eventsJerry Zhang2017-12-151-265/+139
| | | | | | | | | | | | | | | | | | | | 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
* Discourage use of "_data" column.Jeff Sharkey2016-01-061-13/+11
| | | | | | | | | | | | | | | | | | 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
* MTP: Fix partial implementation of 5 new audio specific propertiesMike Lockwood2015-01-231-0/+22
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* More work on App Ops service.Dianne Hackborn2013-01-161-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement a cancelation mechanism for queries.Jeff Brown2012-01-271-5/+5
| | | | | | | | | | | | | 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
* MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file systemMike Lockwood2011-07-111-1/+0
| | | | | | | Bug: 4561836 Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP and media provider support for multiple storage devices:Mike Lockwood2011-04-051-7/+4
| | | | | | | | | | | | | - 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
* MTP: Fix NPE in MtpPropertyGroupMike Lockwood2011-02-081-1/+1
| | | | | Change-Id: I65fbd3f2f62724434136c6ae310e6647884902d2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for querying all objects in GetObjectPropListMike Lockwood2011-02-071-16/+26
| | | | | Change-Id: I1f31971c4c777462f485e52fac016dc0fff48ad9 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix race conditions in MtpServer JNI codeMike Lockwood2011-01-251-1/+1
| | | | | | | | | | 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>
* Move MTP Java classes to android.mtp.* package.Mike Lockwood2010-12-301-0/+442
Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c Signed-off-by: Mike Lockwood <lockwood@android.com>