summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Throw correct exception for null paths" into mnc-devMarco Nelissen2015-07-291-1/+5
|\
| * Throw correct exception for null pathsMarco Nelissen2015-07-271-1/+5
| | | | | | | | | | Bug: 22519119 Change-Id: I8aff294201dfd8ec46ff3d30e4ceecea1346f29b
* | Use own package name when not processing IPC.Jeff Sharkey2015-07-271-1/+9
|/ | | | | Bug: 22753582 Change-Id: I73f3e8b7bc3fabab92909a183fcc71be7bb667b4
* Check app-ops when enforcing permissions.Jeff Sharkey2015-07-241-24/+55
| | | | | | | | | | | | | | | | When enforcing various storage permissions, check associated app-ops to see if they've been revoked. We're okay throwing outright, since Environment already told the app that volumes are unmounted, so they have no business poking around. Read/write sanity checking should only be relaxed to group-level for files living on storage devices; continue using globally readable flags for all other files. Refresh storage paths whenever volumes change. Bug: 22718722 Change-Id: I8640998f490550b4cd3a9b27bb6cb1a658bd102a
* Move permission checking from "other" to "group."Jeff Sharkey2015-07-211-2/+2
| | | | | | | | | The new storage layout used for runtime permissions uses the "group" ACL for enforcing access, and the "other" ACL is usually masked off completely. Bug: 22525550 Change-Id: I29b48cc3425ccfc8d3ff5ec323c8dc50be104878
* MtpService always expects a start intent.Jeff Sharkey2015-07-091-1/+1
| | | | | | | | Return START_REDELIVER_INTENT to make sure we always get the intent if we're ever killed and restarted. Bug: 22349167 Change-Id: I696284b8d55a8c8d1fb2362cd769981ae0d45366
* Generate stable MTP storage IDs.Jeff Sharkey2015-07-082-17/+22
| | | | | | | | | It ends up that MediaProvider is persisting MTP storage IDs in its database, so we need to make sure we generate stable IDs over time, otherwise we can end up looking into a black hole. Bug: 22256092 Change-Id: Ia419c37f87c7c0aa59ef0de530fd219c82988f6c
* Localize <unknown> from MediaProvider.Makoto Onuki2015-06-121-2/+12
| | | | | | Bug 21581123 Change-Id: I765e047ea65b3b6e19b3814502246a31be1b41b3
* Fix USB access control when adb is disabled.Nick Kralevich2015-06-102-40/+13
| | | | | | | | | | | | | | | | | | | When adb is disabled, the default usb mode would be "none", which would turn off the driver and prevent UsbDeviceManager from receiving any new USB connect / disconnect messages. This prevents the user from ever enabling MTP and sharing data when adb is turned off. As discussed in bug 21429947, we work around this problem by keeping the USB driver in MTP mode most of the time, so that we continue to receive USB connect / disconnect messages. To avoid leaking confidential user photos, this change honors the unlock state sent to us by the UsbDeviceManager code. We only expose user data if explicitly authorized by the user. MTP being enabled is decoupled from data being exposed on the USB connection. Bug: 21429947 Change-Id: I495011aa4e3e18c5e5e6fe7b9d0e1a3efe747ee7
* Add support for AudioAttributes flags in RingtonePickerActivityJean-Michel Trivi2015-05-211-0/+13
| | | | | | | | | | Read EXTRA_RINGTONE_AUDIO_ATTRIBUTES_FLAGS from intent to change the AudioAttributes flags on the Ringtone instance used to play the selected ringtone. Bug 19407114 Change-Id: I2d923ef27e8db19b2560a129ba2462c90a07a997
* Only extract FAT UUID for primary physical.Jeff Sharkey2015-04-241-1/+4
| | | | | | | | We can now have primary emulated removeable storage, which causes this code to be upset. Bug: 19993667 Change-Id: Id806c5d41ede6e040af9a48496b9e103a9c75962
* Follow MtpStorage refactoring.Jeff Sharkey2015-03-301-3/+3
| | | | | Bug: 19993667 Change-Id: I6380ac08f2eb91af81277d0ace42943e20112b2d
* am fe619b53: am 1baeeea4: am d1f37448: Check mCurrentThumbRequest.mPath to ↵leozwang2015-02-091-16/+18
|\ | | | | | | | | | | | | prevent crash. * commit 'fe619b536938e7c2835c4858b96983ff7d297932': Check mCurrentThumbRequest.mPath to prevent crash.
| * am 1baeeea4: am d1f37448: Check mCurrentThumbRequest.mPath to prevent crash.leozwang2015-02-071-16/+18
| |\ | | | | | | | | | | | | * commit '1baeeea4c716b650346030e6da7bee38609028cf': Check mCurrentThumbRequest.mPath to prevent crash.
| | * Check mCurrentThumbRequest.mPath to prevent crash.leozwang2015-02-061-16/+18
| | | | | | | | | | | | | | | | | | Bug: 19246412 Change-Id: I25c2f09ded0527ac062d9c8a57adf3aa7639ea76
* | | No longer need to take care of pre boot msg.Dianne Hackborn2015-01-291-6/+0
|/ / | | | | | | Change-Id: Ib91d67a952582090d1fccf1dc8e7902edad2dfa5
* | am 9200927d: Merge "MediaProvider: When insert files to "internal.db", ↵Marco Nelissen2014-12-041-2/+10
|\ \ | |/ |/| | | | | | | | | Don\'t notify MTP." * commit '9200927da3277128cfb517d54cea8be52d6ae602': MediaProvider: When insert files to "internal.db", Don't notify MTP.
| * MediaProvider: When insert files to "internal.db",xiaochao2014-12-021-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't notify MTP. Steps to Reproduce: 1. Connect DUT to Win7 PC via USB cable. 2. Do Factory reset, don't unplug the USB cable during the reset. ->DUT will reboot automatically after factory reset. 3. After DUT enters the system, transfer some files to the DUT by MTP or take some photos by Camera. Expected Results: Read DUT files normally on Win7 PC. Actual Results: The files transferred by MTP are named as "Local Disk" on the PC. And the photos token by Camera can not be showed. After file is inserted into "internal.db", don't notify MTP. If notify, PC will get no data from DUT because MtpServer will only query file's info from "external.db" and after PC gets no data so many times, it won't send "GetObjectPropList" request to DUT, that will cause "Local Disk" showed on the PC side. Change-Id: I6cb364158dbda8b267bdfbf6663d0682f7d4d6cb Signed-off-by: xiaochao <xiaochao.huang@intel.com> Signed-off-by: Bo Huang <bo.b.huang@intel.com>
* | Fix SQLiteDiskIOException in stability testBenson Huang2014-11-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because Sprout has removable storage, the framework needs to maintain external database for keeping multiple databases between SD cards. When cleaning up databases for old external storage volumes, we can't delete .db-shm and .db-wal because these two files always have the latest data and .db doesn't have. Using camera or Google+ will access .db-shm and .db-wal to get the latest data and will cause SQLite Disk I/O exception if they are deleted. The fix is to modify the logic of cleaning up databases (only delete .db file, not to delete .db-shm and .db-wal file). Bug 18412563 Review: https://partner-android-review.git.corp.google.com/#/c/187072 Signed-off-by: Benson Huang <benson.huang@mediatek.com> Change-Id: I484bd535ddebee09824a10f12241f6b2ce086b94
* | Reset album and artist tables due to change in how collation keys are ↵Mike Lockwood2014-10-271-0/+10
|/ | | | | | | calculated. Bug: 18118488 Change-Id: If1d12def4598be9cbf86b8550061f4d075be9717
* Check access before creating thumbnailMarco Nelissen2014-10-141-3/+9
| | | | | Bug: 17943556 Change-Id: I1ee026fc0f6248dab2e678e478ba76e8d464dba6
* Revert "RingtonePicker: use a non-intercepted stream for playback."Hyejin Kim2014-09-111-3/+0
| | | | | | | | | | This reverts commit c50b2befee37f28f9b482b0a31a62329142e4a6a. When user set alarm ringtone in DeskClock, It can't play with AudioManager.STREAM_SYSTEM stream type Bug: 16906307 Change-Id: Ia0d8df9b5c31441d34dc82678bceccd8ce31423d
* Use material alert dialog item view layoutAdam Powell2014-08-111-1/+1
| | | | | | Bug 16552638 Change-Id: If32429d6c124970b22075930a60fa23cafed8395
* RingtonePicker: use a non-intercepted stream for playback.John Spurlock2014-07-201-0/+3
| | | | | | | | | | When choosing a ringtone, avoid the ringer stream during playback to avoid interception. As before, no playback is performed if muted. Bug:15344396 Change-Id: I7301c7e60682c57187708dfc8fa933a150c5147a
* fix npe in MediaProviderNick Kralevich2014-05-271-1/+1
| | | | | | vaguely related to bug 10733373 Change-Id: Icda99a66d893374de7a1ed84d24f2c97a72b90b2
* am 4c546b54: am 501b93fb: am 17750fdd: Merge "Clean up cursors in try/finally"Marco Nelissen2014-05-161-188/+196
|\ | | | | | | | | * commit '4c546b546801fc63a7b439ae2350ae4239a664df': Clean up cursors in try/finally
| * Clean up cursors in try/finallyMattias Nilsson2014-05-141-188/+196
| | | | | | | | | | | | Make sure we release cursor resources. Change-Id: Ia122100b1350ae5db4804f8f0e95c49785ab645b
* | am 98109a4b: am 9adb079c: Merge "Track API package change."Elliott Hughes2014-04-281-6/+6
|\| | | | | | | | | * commit '98109a4bea074d49106545a349c1b8a401e6635b': Track API package change.
| * Merge "Track API package change."Elliott Hughes2014-04-281-6/+6
| |\
| | * Track API package change.Elliott Hughes2014-04-281-6/+6
| | | | | | | | | | | | Change-Id: Ie2ee436d9d5aa8f189bcb5a64116d09fccc5233b
* | | am 26fdc564: am 7d0d2486: Merge "Deactivate the MiniThumbFile when it is not ↵Marco Nelissen2014-04-251-0/+1
|\| | | | | | | | | | | | | | | | | | | | needed." * commit '26fdc564d60a1e2ad73c9a0d63418dc13097e750': Deactivate the MiniThumbFile when it is not needed.
| * | Deactivate the MiniThumbFile when it is not needed.hanpengx2014-04-171-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue description: Unable to use camera after deleting all files in internal storage from PC with MTP. The toast message "Connect USB storage before using the camera" is poped up when we launch camera after deleting all files in internal storage from PC with MTP. Steps to reproduce the issue: 1. Launch Camera and take a picture. 2. Connect device to PC with MTP mode. 3. Delete all files on Internal stoage from PC. 4. Launch Camera after step 3 finished. Then we find that we are unable to use camera and the toast message is poped up. Root cause: The .thumbdata3--xxxxx in /sdcard/DCIM/.thumbnails/ is opened in android.process.media process when we take picture in step 1. But the file is never closed. So camera cannot create the directories(/sdcard/DCIM/Camera) it needs to store captured pictures because "Device busy" error. Solution: Deactivate the MiniThumbFile when it is not needed. Change-Id: I0faab5ffd95c5626f7f9ef1bc02b2ae56e2eb19b Signed-off-by: hanpengx <pengfeix.han@intel.com>
* | Unset server before database is discarded.Marco Nelissen2014-03-271-0/+6
| | | | | | | | | | | | | | This fixes a broadcastreceiver leak. b/13622801 Change-Id: If9da147163c8f819eae66f97424a37e6f6f6d3aa
* | Scan OEM directory for ringtones, etc.Jeff Sharkey2014-03-191-0/+1
| | | | | | | | | | | | | | Allows custom ringtones, notification sounds, and alarm sounds. Bug: 13340779 Change-Id: I50dc9c6feca6c769edaf6b1fdd85f4b488c4da73
* | MTP: Add support for device property changed notificationsMike Lockwood2014-03-071-0/+2
| | | | | | | | | | Bug: 7342482 Change-Id: I56851a97303a72e999bdff009a59a2924f586e69
* | am ba1cd257: Merge "Allow holders of WRITE_MEDIA_STORAGE to write to ↵Jeff Sharkey2014-02-101-5/+16
|\| | | | | | | | | | | | | secondary external storage" * commit 'ba1cd257603746daf38f4b1fe4cac8528b77de6e': Allow holders of WRITE_MEDIA_STORAGE to write to secondary external storage
| * Allow holders of WRITE_MEDIA_STORAGE to write to secondary external storageJohan Redestig2014-01-281-5/+16
| | | | | | | | | | | | | | | | Apps with WRITE_MEDIA_STORAGE can write to the secondary external storage directly so there is no need to prevent that through the MediaProvider. Change-Id: If092fcdf0b90599afdb52a8e6ae4c7ba1090acc4
* | Clear cache when needed.Marco Nelissen2014-02-041-0/+4
| | | | | | | | Change-Id: I2355ec73cdf82b7c51a154c7ef2269791240638b
* | Fix cache permission check, avoid double checksMarco Nelissen2013-12-131-13/+16
| | | | | | | | Change-Id: Ic3f9799147b3f12c71fd824da9de51e264b70488
* | am 83542cf9: am 3fa4c1f0: Fix argument referencesMarco Nelissen2013-11-131-4/+7
|\| | | | | | | | | * commit '83542cf9e01ce8822992d85fbe308ae3b05a5c28': Fix argument references
| * am 3fa4c1f0: Fix argument referencesMarco Nelissen2013-11-131-4/+7
| |\ | | | | | | | | | | | | * commit '3fa4c1f0f2d9631aa41567b6c2efb2716421ba40': Fix argument references
| | * Fix argument referencesMarco Nelissen2013-11-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bucket id and display names references were off by one, resulting in brokenness when renaming a directory via MTP b/10835798 b/11655617 Change-Id: I9e6c510027a37deed55887393e388805f06b86b0
* | | am 4df227f9: am 6ab6373d: Check granted permissions for all pathsMarco Nelissen2013-10-311-7/+14
|\| | | | | | | | | | | | | | * commit '4df227f90943e9239f61b120d81d94dfe54f949f': Check granted permissions for all paths
| * | am 6ab6373d: Check granted permissions for all pathsMarco Nelissen2013-10-311-7/+14
| |\| | | | | | | | | | | | | * commit '6ab6373dea9c980c41c1cb1d5f59e0fd78bbf8a7': Check granted permissions for all paths
| | * Check granted permissions for all pathsMarco Nelissen2013-10-301-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | b/9604671 b/10345049 b/11380658 Change-Id: Ifa4db10261f39e5af5fe84902f7221075a78bad3
* | | Append separator to avoid common prefix matchMarco Nelissen2013-10-231-3/+7
| | | | | | | | | | | | | | | | | | | | | We should match against "/storage/foo/" instead of "/storage/foo", in case there is a path that is a prefix of the other. Change-Id: If6cda18768039a130dfb81dd402ac4ce7b26a2a7
* | | am 1a74cc6d: am d5fdded8: resolved conflicts for merge of d8eb423a to klp-devMarco Nelissen2013-10-231-1/+4
|\| | | | | | | | | | | | | | * commit '1a74cc6de99d93234c4daf2c56d9ffd39be25c58': Also check legacy path
| * | am d5fdded8: resolved conflicts for merge of d8eb423a to klp-devMarco Nelissen2013-10-231-1/+4
| |\| | | | | | | | | | | | | * commit 'd5fdded86912e9c6a3b28034803989656e9a80ad': Also check legacy path
| | * resolved conflicts for merge of d8eb423a to klp-devMarco Nelissen2013-10-231-1/+4
| | |\ | | | | | | | | | | | | Change-Id: I44c7c7d0e1da8fd169a0bf57696e308631fa9f25
| | | * am cefdabeb: am 49f75ad3: am d2727762: am b4a53aa4: am 5943bf87: Also check ↵Marco Nelissen2013-10-231-1/+4
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legacy path * commit 'cefdabebd2003272d3e2a799b606e877a32d9304': Also check legacy path