summaryrefslogtreecommitdiffstats
path: root/packages/ExternalStorageProvider
Commit message (Collapse)AuthorAgeFilesLines
* Automatic translation importMichael Bestas2015-12-256-0/+124
| | | | Change-Id: I96f3c5a41d3c52473c161aaf2c97d821caa99bb9
* Clean stale entries when deleting files.Jeff Sharkey2015-09-251-1/+21
| | | | | | | | | | | When deleting files directly from external storage devices, remove any matching entries from MediaStore so we don't end up showing stale entries to clients, such as MTP/PTP. Also handles the case where an entire directory is deleted. Bug: 24045921 Change-Id: I802470fa1aa03e0bec147ea113f1a49e26a0f3f9
* Import translations. DO NOT MERGEBaligh Uddin2015-09-182-1/+23
| | | | | Change-Id: Iccdea720e2b636f99e014f195772bff4a0afc149 Auto-generated-cl: translation import
* Handle volumes without visible paths.Jeff Sharkey2015-07-301-1/+5
| | | | | | | | Transient volumes like USB drives are not mounted as visible, so we shouldn't be kicking off media scanner for them. Bug: 22545248 Change-Id: Ic8f2d3134f1edb8b2a12e8ff283eceeeb230f48b
* Import translations. DO NOT MERGEGeoff Mendal2015-07-153-5/+5
| | | | | Change-Id: I2960b24e8ab390425898ac33034b24ceae260a65 Auto-generated-cl: translation import
* If user ejects a storage from details, take user to...Makoto Onuki2015-07-011-2/+7
| | | | | | | | | | | | | | | | | | | | ... the storage list view 1. Change to ExternalStorageProvider When available volumes have changed, it now notifies on "content://com.android.externalstorage.documents" rather than on "content://com.android.externalstorage.documents/root/", because it'll also affect "content://com.android.externalstorage.documents/document/*/children". 2. Change to DocumentUI - DirectoryLoader now won't crash when a provider returns null. - DirectoryFragment now closes itself (i.e. emulate a back press) when a load failed. - It now correctly reloads contents when a volume is ejected thanks to 1. Bug 21472170 Change-Id: Icf4bbc2ebb9067313dbbb67083cd4115b0a75c58
* Update file size formatting.Jeff Sharkey2015-06-151-9/+12
| | | | | | | | | | | | Per UX, default strings should have space between value and units resulting in "12.3 GB". Add a formatting variant that returns the various components for callers who want to build their own strings. For now there is only one mounted emulated volume at a time, and it's always the primary storage, so give it the default rootId to keep old Uris working. Change-Id: Ifcc72a91a6b397ee65dc92642153286186eb64ac
* Import translations. DO NOT MERGEGeoff Mendal2015-05-301-0/+1
| | | | | Change-Id: I6c36a192af260cddb4e659825037b5727a9c8fcd Auto-generated-cl: translation import
* Move extension checking code into FileUtils.Ben Kwa2015-04-234-184/+1
| | | | | | | | | | Move code for checking file extensions and MIME types from ExternalStorageProvider into android.os.FileUtils, so it can be used by other clients (e.g. DownloadsProvider). BUG=20157955 Change-Id: Ib16a16af723c21fb8d2912c8917dfd68653ea6fa
* Import translations. DO NOT MERGEGeoff Mendal2015-04-223-0/+66
| | | | | Change-Id: Ib1c155c8eedd0773a5d973813665792e749dd458 Auto-generated-cl: translation import
* Broadcast hidden volumes, notification polish.Jeff Sharkey2015-04-181-3/+1
| | | | | | | | | | | Send limited broadcast intent when certain volume state changes occur; the only customer for now is ExternalStorageProvider. Change notification flow to be less bumpy. Pick USB icon based on disk type, and avoid using "generic" disk labels. Bug: 19993667 Change-Id: I263bc9e9aae2ae57eb4d1afe76da686aee5475fb
* Wire up non-visible volumes, more states.Jeff Sharkey2015-04-181-63/+90
| | | | | | | | | | | | | | | | | | Adds logic to ExternalStorageProvider to scan non-visible volumes, such as USB OTG devices. We use internal paths when surfacing these volumes, which also optimizes around the FUSE daemon for public devices. Also dumps internal state when requested. VolumeInfo now directly contains DiskInfo, which means it's snapshotted when sending events, avoiding teardown races. Switch notifications to use this DiskInfo directly. Finish wiring up new volume state, including helper methods to make it readable/writable state clearer. Handle disks and volumes with spaces in their labels. Bug: 19993667 Change-Id: I5c75e5658a6415976811477aebafee7694bde0f4
* DocumentsUI roots can have settings.Jeff Sharkey2015-04-121-0/+1
| | | | | | | | | | Roots use a flag to indicate they have settings, and DocumentsUI offers to launch towards someone who handles a new Settings intent. Slight rename of browse intent for clarity. Bug: 19993667 Change-Id: I86302ec1cfac5e435d8bc5701bdb85fb9b0dcbae
* Import translations. DO NOT MERGEGeoff Mendal2015-03-201-0/+22
| | | | | Change-Id: I5d8cc25c94f71a9f3f14307fbb2f09e0779f4d6e Auto-generated-cl: translation import
* am 45207128: am 05d455ca: am b9ccc047: Merge "Sanitize display names, keep ↵Jeff Sharkey2014-12-014-39/+191
|\ | | | | | | | | | | | | extensions intact." into lmp-mr1-dev * commit '45207128c5c4f0d1f106af8561bdd156546b0aad': Sanitize display names, keep extensions intact.
| * Sanitize display names, keep extensions intact.Jeff Sharkey2014-12-014-39/+191
| | | | | | | | | | | | | | | | | | | | | | | | When creating or renaming files on external storage, sanitize the requested display names to be valid FAT filenames. This also fixes a handful of directory traversal bugs. Also relax logic around generating display names to allow any extension which maps to the requested MIME type. Tests to verify. Bug: 18512473, 18504132 Change-Id: I89e632019ee145f53d9d9d2050932f8939a756af
* | am 1b632db2: am ea1841a3: Merge "Use default volume description when missing ↵Jeff Sharkey2014-10-251-1/+6
|\ \ | |/ | | | | | | | | | | label." into lmp-mr1-dev automerge: cc66a23 * commit '1b632db2074365a7094177f655a4f750807f61f0': Use default volume description when missing label.
| * Use default volume description when missing label.Jeff Sharkey2014-10-241-1/+6
| | | | | | | | | | | | | | | | Some mounted storage volumes may not have a user-defined label. In those cases, use the default description for the volume. Bug: 17781505 Change-Id: I8558ba2615c2ff2647a5d44afaec83249df466ab
* | Import translations. DO NOT MERGEBaligh Uddin2014-09-161-2/+2
| | | | | | | | | | Change-Id: I1e4ac2d534b14eac10dd3169981dd6ad668aeaee Auto-generated-cl: translation import
* | Import translations. DO NOT MERGEBaligh Uddin2014-09-081-1/+1
|/ | | | | Change-Id: I0c6e80b85a255f32a7298c1caf4cde9b41cb8732 Auto-generated-cl: translation import
* Scan after writing external storage files.Jeff Sharkey2014-08-051-1/+24
| | | | | | | Kicks off media scanner after files are written. Bug: 13557203 Change-Id: I61613f28e07b068573079cc1e362fd3fe135684e
* Remove deprecated locales - DO NOT MERGEBaligh Uddin2014-07-199-197/+0
| | | | Change-Id: Iac5489639edae2373ed0ce92f7d0fe22629a249a
* Import translations. DO NOT MERGEBaligh Uddin2014-07-058-0/+176
| | | | | Change-Id: Id3da3bdc18533f885bd34e4afa40c6479a6a0413 Auto-generated-cl: translation import
* Import translations. DO NOT MERGEBaligh Uddin2014-06-3017-0/+332
| | | | | Change-Id: Ia29fa1cb6cdd0135a0120ca2f5c2e14432a4b158 Auto-generated-cl: translation import
* Refactor directory API to "opening document tree."Jeff Sharkey2014-06-091-1/+1
| | | | | | | | | Cleans up API so it consistently refers to opening or working with a subtree of documents. Also separates isChildDocument() support from the concept of directory tree selection. Bug: 15429194 Change-Id: Ice66a751ff4bd0cc4d34c44c5da13a0dc4186dc9
* Merge "Support for renaming documents."Jeff Sharkey2014-05-221-1/+25
|\
| * Support for renaming documents.Jeff Sharkey2014-05-211-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DocumentsProviders can mark documents as supporting rename, and they have the opportunity to change the DOCUMENT_ID as a side effect of the rename. This supports providers that embed the display name into DOCUMENT_ID. Issues a URI permission grant to the new document, if any. Adds renaming support to platform ExternalStorageProvider. Also adds directory deletion support. Bug: 12350110 Change-Id: Ica4b1ae6769ee994f70f6b6b2402213eebd064e0
* | Import translations. DO NOT MERGEBaligh Uddin2014-05-201-1/+1
|/ | | | | Change-Id: Icef6a475d648a2970d5918e9ab7abe98cf676117 Auto-generated-cl: translation import
* am 21de56a9: Add directory selection to DocumentsProvider.Jeff Sharkey2014-04-231-3/+20
|\ | | | | | | | | * commit '21de56a94668e0fda1b8bb4ee4f99a09b40d28fd': Add directory selection to DocumentsProvider.
| * Add directory selection to DocumentsProvider.Jeff Sharkey2014-04-221-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new ACTION_PICK_DIRECTORY that allows users to grant access to an entire document subtree. Instead of requiring grants for each individual document, this leverages new prefix URI permission grants by defining new "via"-style URIs: content://com.example/via/12/document/24/ This references document 24 by using a prefix grant given for document 12. Internally, we use isChildDocument() to enforce that 24 is actually a descendant (child, grandchild, etc) of 12. Since this is an optional API, providers indicate support with Root.FLAG_SUPPORTS_DIR_SELECTION. Extend DocumentsUI to support picking directories. Expose createDocument() API to work with returned directories. Offer to canonicalize via-style URIs into direct URIs, generating exact permission grants along the way. Override openAssetFile() to pass through CancellationSignal. Move testing code into ApiDemos. Bug: 10607375 Change-Id: Ifffc1cff878870f8152eb6ca0199c5d014b9cb07
| * Import translations. DO NOT MERGEBaligh Uddin2014-03-191-1/+1
|/ | | | | Change-Id: Ic7a9bdd8f8da2462638e3abf361ef938d1fb2a9e Auto-generated-cl: translation import
* Remove deprecated localesBaligh Uddin2013-12-091-21/+0
| | | | | Bug:11340849 Change-Id: Ib99486303927a6bce308b113d70f8e5b5bce4a13
* am 874dfd73: am 34163e82: am 55d12486: Merge "Give storage provider access ↵Jeff Sharkey2013-11-111-0/+1
|\ | | | | | | | | | | | | to secondary devices." into klp-dev * commit '874dfd733a2fd2224f155ee2c4cf5e3065676402': Give storage provider access to secondary devices.
| * am 34163e82: am 55d12486: Merge "Give storage provider access to secondary ↵Jeff Sharkey2013-11-111-0/+1
| |\ | | | | | | | | | | | | | | | | | | devices." into klp-dev * commit '34163e8259db8661afbb267e3b899b64f429bcb7': Give storage provider access to secondary devices.
| | * Give storage provider access to secondary devices.Jeff Sharkey2013-11-111-0/+1
| | | | | | | | | | | | | | | Bug: 11411460 Change-Id: I3827ed5b859a68c60742a27917459e8df2c276bb
* | | am 66d079bf: am f7eb3398: am 19949b9d: Merge "Guard against missing document ↵Jeff Sharkey2013-10-291-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | columns." into klp-dev * commit '66d079bf25ff3f99dbba91e02d392c936238170b': Guard against missing document columns.
| * | am f7eb3398: am 19949b9d: Merge "Guard against missing document columns." ↵Jeff Sharkey2013-10-291-0/+5
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit 'f7eb3398f16f4d76d2a342cf571040360d5a6df6': Guard against missing document columns.
| | * Guard against missing document columns.Jeff Sharkey2013-10-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | When filtering and sorting, guard against missing columns to avoid crashing entire app. Bug: 11377065 Change-Id: I04f035c918d743bcc84592f05e3ef9ad0ebfadce
* | | am e643e337: am 99dcb2eb: am 10e509dc: Merge "Use inotify to update ↵Jeff Sharkey2013-10-281-1/+92
|\ \ \ | |/ / | | | | | | | | | | | | | | | DocumentsUI." into klp-dev * commit 'e643e33736e14a59f1f9a8acb4d630b2ea671a31': Use inotify to update DocumentsUI.
| * | am 99dcb2eb: am 10e509dc: Merge "Use inotify to update DocumentsUI." into ↵Jeff Sharkey2013-10-281-1/+92
| |\ \ | | |/ | | | | | | | | | | | | | | | klp-dev * commit '99dcb2eb3578c3d14658b3850cb3e32608e173b1': Use inotify to update DocumentsUI.
| | * Use inotify to update DocumentsUI.Jeff Sharkey2013-10-251-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While user is actively looking at a directory, subscribe to inotify events and notify of content changes to trigger requeries. Reference count the observers, since multiple cursors are regularly open during requeries. Fix leaking cursors on activity rotation; crazy loader ID generation is no longer needed. Bug: 10999396 Change-Id: Iddeb08a056fee80c93df8499874705bcd213a1e2
* | | am de9b66fe: am 3ac436b7: am 80f103ae: Merge "Extra to always show advanced ↵Jeff Sharkey2013-10-251-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | devices." into klp-dev * commit 'de9b66fee1bdbc914c287fb9a2aa832dc2d3e6f9': Extra to always show advanced devices.
| * | am 3ac436b7: am 80f103ae: Merge "Extra to always show advanced devices." ↵Jeff Sharkey2013-10-251-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit '3ac436b758830eb938c62d5ed91caa7808b5b63e': Extra to always show advanced devices.
| | * Extra to always show advanced devices.Jeff Sharkey2013-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Also always lower-case extension to extract MIME type correctly, we may want to fix in MimeUtils at some point. Bug: 11354402 Change-Id: I77d0c06a663cd0c4320c41553ff1980b6f9a7778
* | | am 46106ca2: am 686fa2db: am c832ef0d: Merge "Show spinner while waiting for ↵Jeff Sharkey2013-10-241-1/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | mutations." into klp-dev * commit '46106ca28e8a679ce2f0609d03ae6ba4b95d7f30': Show spinner while waiting for mutations.
| * | am 686fa2db: am c832ef0d: Merge "Show spinner while waiting for mutations." ↵Jeff Sharkey2013-10-241-1/+10
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit '686fa2db5b8feeb9e378aeb8e5dbac2f79ef2153': Show spinner while waiting for mutations.
| | * Show spinner while waiting for mutations.Jeff Sharkey2013-10-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | When mutation operations are waiting for a storage backend, show a spinner in place of the save button. Bug: 11333249 Change-Id: I2b620b4532ad977a2b60d4bdc5caa55f89021456
* | | am 05f92b7c: am 6599c128: am 871cb5d5: Merge "Update roots when data ↵Jeff Sharkey2013-10-231-12/+38
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | cleared, refresh UI." into klp-dev * commit '05f92b7c5810dfc4e96cd5dddff1f7f380739136': Update roots when data cleared, refresh UI. Treat document thumbnails as preemptable.
| * | am 3a27585d: am a9a6007c: Merge "Treat document thumbnails as preemptable." ↵Jeff Sharkey2013-10-231-12/+38
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit '3a27585df77997b5ea01a086b739ee6866000444': Treat document thumbnails as preemptable.
| | * Treat document thumbnails as preemptable.Jeff Sharkey2013-10-231-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | When a more important request comes along, preempt all outstanding thumbnail requests. Bug: 11317901 Change-Id: I164fc8d804bb9c471e6da3f8127228043b3ca482