summaryrefslogtreecommitdiffstats
path: root/packages/ExternalStorageProvider
Commit message (Collapse)AuthorAgeFilesLines
* Automatic translation importAbhisek Devkota2017-02-191-0/+21
| | | | Change-Id: I80e32cc003cc9c8707732b27a683e87cdd67375d
* Public volumes belong to a single user.Jeff Sharkey2017-02-031-1/+2
| | | | | | | | | | | | | | | When a public (vfat) device is inserted, it's strongly associated with the current foreground user, and no other users should be able to access it, since otherwise that would be a cross-user data leak. To use the device under a different user, switch users and then eject/remount the device. Test: verified user isolation of USB drive Bug: 32523490 Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614 (cherry picked from commit 8b38d083c42e2706e1ff5a1410fa61d1f5dea3f5) (cherry picked from commit 47e62b7fe6807a274ba760a8fecfd624fe792da9)
* Automatic translation importpinky@build012016-08-273-0/+63
| | | | | Change-Id: If7eac9a9fa7e145c9d35ece91a8ccab33601a1ca Ticket: -
* Partially revert "Merge tag 'android-6.0.1_r22' of ↵Michael Bestas2016-05-046-6/+29
| | | | | | | | | https://android.googlesource.com/platform/frameworks/base into cm-13.0" This reverts commit 0e1dbed9194839a90755670d8fdf9046a75b85f7, reversing changes made to 564f10b8f05ddf4d9ea2c0e64f1b113fe6dad4b8. Change-Id: Ife3a8c9c898034d5161fbf25a03eaf173ec66246
* Automatic translation importMichael Bestas2016-04-161-0/+21
| | | | Change-Id: Ib87e41106982b159d249ebbe0653e569f9c7b454
* Automatic translation importMichael Bestas2016-04-061-0/+21
| | | | Change-Id: I3849e73aee18720b20529d406c7657c0a0cee320
* Fix ownership for files/folders created by ExternalStorageProvider on ext4/f2fsJani Lusikka2016-03-291-0/+8
| | | | | | | | By forcing ExternalStorageProvider to use the sdcard FUSE layer for access, ext4/f2fs sdcards will be treated with the correct media_rw:media_rw permissions instead of the current app permissions. Change-Id: I2cbb97727ebe5af88a879490732925406a165af5
* Automatic translation importMichael Bestas2016-03-282-0/+42
| | | | Change-Id: Ib371d8f862dced4aa36cfe076f876e9ae4bd62c2
* Automatic translation importMichael Bestas2016-03-1813-0/+165
| | | | Change-Id: I4af2a6a904e9229b261e95818f716d6b5708a6f4
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-116-29/+6
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into cm-13.0 Android 6.0.1 release 22 Change-Id: I0d31899b234156a91accb61e0a7fb3d8d16d5062
| * am 58843059: am e69ff2a8: Merge "Clean stale entries when deleting files." ↵Jeff Sharkey2015-09-301-1/+21
| |\ | | | | | | | | | | | | | | | | | | into mnc-dr-dev * commit '588430591b7bb5340ff02f05f1c02eaf924326ad': Clean stale entries when deleting files.
| | * am e69ff2a8: Merge "Clean stale entries when deleting files." into mnc-dr-devJeff Sharkey2015-09-301-1/+21
| | |\ | | | | | | | | | | | | | | | | * commit 'e69ff2a878ee7635a467259995e2924fb96a3a72': Clean stale entries when deleting files.
| * | \ am e7477002: am 0eaadbc2: am 5db4cc8f: Merge "Handle volumes without visible ↵Jeff Sharkey2015-07-311-1/+5
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | paths." into mnc-dev * commit 'e7477002683a83ce3022365fe6c327bbc31055cc': Handle volumes without visible paths.
| | * | am 0eaadbc2: am 5db4cc8f: Merge "Handle volumes without visible paths." into ↵Jeff Sharkey2015-07-311-1/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mnc-dev * commit '0eaadbc2a9b7350ba839ad14590c34235e42e28b': Handle volumes without visible paths.
| * | \ \ am 650a193e: am 164d229a: am dfd6301f: Merge "If user ejects a storage from ↵Makoto Onuki2015-07-061-2/+7
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | details, take user to... ... the storage list view" into mnc-dev * commit '650a193e8b1610938954851e6d855338b44e239d': If user ejects a storage from details, take user to... ... the storage list view
| * | | | am a65a1582: Merge "Update file size formatting." into mnc-devJeff Sharkey2015-06-161-9/+12
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a65a1582f5a04b15b53ebdec337ac611ccb78a07': Update file size formatting.
* | | | | | 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.