0cce5355b45d835f95a8918b8b803fd977d374e4 |
|
26-Nov-2014 |
Jeff Sharkey <jsharkey@android.com> |
Sanitize display names, keep extensions intact. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
c99d00be675fa34944d47d340f4168564bd4cd64 |
|
24-Oct-2014 |
Jeff Sharkey <jsharkey@android.com> |
Use default volume description when missing label. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
ab1e9bddd83466f15c2f61fbc0b942c6416eb87a |
|
05-Aug-2014 |
Jeff Sharkey <jsharkey@android.com> |
Scan after writing external storage files. Kicks off media scanner after files are written. Bug: 13557203 Change-Id: I61613f28e07b068573079cc1e362fd3fe135684e
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
b9fbb7290b02de1ce621deaa2d28a5e42f2e0937 |
|
05-Jun-2014 |
Jeff Sharkey <jsharkey@android.com> |
Refactor directory API to "opening document tree." 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
b7e1255d5c8d9e4fa8dd389afb9f5aab35434df3 |
|
22-May-2014 |
Jeff Sharkey <jsharkey@android.com> |
Support for renaming documents. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
21de56a94668e0fda1b8bb4ee4f99a09b40d28fd |
|
06-Apr-2014 |
Jeff Sharkey <jsharkey@android.com> |
Add directory selection to DocumentsProvider. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
db5ef125007644daa94aeaf1bd8637f4e0095e94 |
|
26-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Use inotify to update DocumentsUI. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
96c620595bd0585f934b0971b4552c57845e9a78 |
|
26-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Extra to always show advanced devices. 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
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
1f706c6cd1cb841adadc2babc57a34e5728983ec |
|
17-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Include external storage devices in DocumentsUI. Include volume UUID in generated document IDs to uniquely identify volumes over time. Show volume label to users. Watch for mount changes to update available roots. Bug: 11175082 Change-Id: Ia151bde768587468efde0c1d97a740b5353d1582
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
c1c8f3f97d344a24bfddcb56a8be05e7e2fabe9e |
|
14-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Add extras to AFD, send orientation metadata. AssetFileDescriptor augments a ParcelFileDescriptor with details about how it should be interpreted, so extend it to support a Bundle of extras. Then use these extras to share thumbnail orientation metadata. The raw image data of EXIF thumbnails matches the orientation of the enclosing image, but the thumbnail data doesn't repeat the EXIF flags. This meant that receivers of openDocumentThumbnail() would get an image that needed to be transformed, but without enough context to actually transform it. Instead of transforming and recompressing the image on the fly on the provider side, send a transformation hint that the receiver side can interpret. Bug: 11205688 Change-Id: Ibc5a7ad002377a55e6ffcb5ac5c8829841002e06
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
d5a4658cea8def24155849a8621608155dcba05c |
|
11-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Treat dates near epoch as unknown. Also document that rootIds need to be stable, so removable media roots should use the media serial number. Bug: 11151557 Change-Id: I1f3dcabcd0474f1bf92d2cafb0f37e82abe34e05
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
6efba22ce510352bb84910d6efc42fecafd31ed7 |
|
28-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
New roots UX, async, performance, docs. Yet another iteration from UX on how roots should be ordered. Since we no longer categorize by type, remove from public API. Updated asset drop with new dividers. Update public API docs to be explicit about required columns. Hide flags and columns that aren't required for third-party apps. Move remainder of potentially blocking work to AsyncTasks, including creating directories, picked root resolution, and creation of new documents once picked. Improve performance of layouts by removing baseline alignment and reduce hierarchy depth. Set alpha on ImageViews directly to avoid offscreen rendering hit. Limit returned recents to 45 days. Show load in recents when still waiting for backends. Show empty message when no recents stacks to create from. Use unique key when saving recent stacks. Bug: 10941423, 10819454, 10964412, 10960718 Change-Id: I08cf589dcda7e203acf67928f4d30322ae36ee94
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
2a030b05a978281147df4d1cc4f12bc8d61c0729 |
|
26-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Directories are always enabled; update assets. Fix bug where item enabled state depended on FLAG_SUPPORTS_WRITE; directories are now always enabled. Also unifies enabled testing. Bug: 10903210, 10946731 Change-Id: I241533d273dfe4a2146bb322a8bd93066bf4ef55
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
5e1a5e5bad475696e842addceb7dd6a519879f98 |
|
22-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Merge "Create unique files, root ordering, UI bugs." into klp-dev
|
5545f56f7561810187545a1817b6001dd1f9931b |
|
21-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Create unique files, root ordering, UI bugs. When a file already exists on disk, try adding a counter suffix to make a unique name. Move services near top of roots list, just below recents. Remove "Documents" root. Increase number of recents allowed from single provider, and add more logging to diagnose wedged loaders. When launching GET_CONTENT apps, wait for successful result before relaying result; canceled requests now return to DocumentsUI. Add CloseGuard to ContentProviderClients, since leaked instances can keep the remote process alive. Fix UI bug around trailing breadcrumbs. Fix bug that dropped Recents from roots list. Add up action to Settings activity. Give our activity a default icon while waiting for async roots to load. Bug: 10818683, 10819461, 10819461, 10819196, 10860199 Change-Id: I7b9e26b1cf8353dd3175458b23da2b4bda6c5831
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
eb8c3f93edc826413ff4143284dec01c1061d5cc |
|
20-Sep-2013 |
Adam Lesinski <adamlesinski@google.com> |
Surfaces ParcelFileDescriptor#parseMode() as API Moves ContentResolver#modeToMode() to ParcelFileDescriptor#parseMode() bug:10711271 Change-Id: I28a5de4ca70adfbec4caf739863b77f0fd7fd9a4
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
3e1189b3590aefb65a2af720ae2ba959bbd4188d |
|
13-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Move search to roots; Documents root; hide empty. Documents searches now happen root-wide, instead of only under a subdirectory. Updates abstract class and flags to match. Add flag for a root to indicate it's empty, and hide empty roots in UI unless creating. Define "Documents" public directory and storage backend to contain files. Bug: 10712057, 10710865, 10710758 Change-Id: I8716367568969f9cb1d83927b2bf5a7013809350
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
4ec973925fc2cd18f9ec0d0ca5af588564fded27 |
|
10-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
More UX work for thumbnails, search, management. Hide non-finished downloads from normal picker UI, but keep them around in management mode. Uses a Uri query parameter and a hidden API on DocumentsProvider. Scale thumbnails to fit viewport, always show MIME icon while waiting on thumbnails, and crossfade between them. Cancel thumbnail tasks when views are recycled. Filter directories out of search results for now. Also leave sort ordering from backend intact, since it's custom ranking. Fix SearchView interaction to dismiss properly and restore across orientation and drawer state changes. Hide most actions when drawer is open. Invalidate RootInfo cache when locale changes. Apply sort ordering when showing recent create directories. Hide recent summary string when icon is enough for user to disambiguate. Bug: 10667184, 10665663 Change-Id: I331d3272a08c497f88dc659d9e112231cb35aa69
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
b7757a6b32edea62a1a9a803ad83579220f26100 |
|
10-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Rename offer() to add(), remove/hide some APIs. Change MatrixCursor offer() to add() based on review feedback. Remove some now-unused XML metadata. Hide document creation, since it's not supported in initial version. Bug: 10577809, 10461706, 10678563 Change-Id: I7b3f4c6899c28f633471ef816bee22bf032aa0d2
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
6d97d3c1a2ebac4e3f32c7e5bc134864ace1c17f |
|
06-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Another asset drop, provider icons, tests. Latest asset update, including provider icons which are treated as special cases for now instead of checking into separate apps. Add tests for MIME type matching of roots. Remove unused XML. Bug: 10510022 Change-Id: Id567a9e06ba241f60ac011823e550253c6c797fb
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
348ad6866b91afa4d59d45df533ef88094c74d13 |
|
03-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Filter roots based on incoming request. When incoming request is for local-only content, or for ACTION_CREATE, only include roots advertise those features. Filters roots based on the allowed MIME types and the supported types advertised by each root. This supports displaying Images and Audio roots only when requesting those content types. Applies the same filter when deciding which roots to query for recents. Fixes advanced filtering instead of limiting to just devices. Update sorting so that Recent always appears first. Add testing support for LOCAL_ONLY. Bug: 10597317, 10526535 Change-Id: Ic5ccf475c4fe93fd52b29388d369d7f6915c0c42
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
ae9b51bfa313c51a31af30875a71255d7b6d2e61 |
|
01-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Refactoring of DocumentsContract. Combines related columns and constants onto the same class so they are easier to discover. Move back to surfacing roots with columns so they are consistent with documents. Advanced roots are represented with a flag instead of distinct types. Flags to indicate supporting of well-known media types, instead of arbitrary an MIME filter. Reintroduce well-formed rootId to support recents. Always use the expanded version of "documents" in constants, methods, and argument names. Refactor DocumentProvider method names to clearly distinguish if a single item or multiple could be returned, and of which type. Add documentation to clearly define which methods have already been overridden. Bug: 10567506, 10567557 Change-Id: I981f26ab82f2b520a19aa1ce66f659de50d7fac0
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
aeb16e2435f9975b9fa1fc4b747796647a21292e |
|
28-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Stronger DocumentsProvider contract. Using a contract class requires that a provider implement it exactly with little help. This change introduces a DocumentsProvider abstract class that provides a client-side implementation of the contract that greatly reduces developer burden, and improves correctness. This also moves to first-class DocumentRoot objects, and moves calls with complex side effects to be ContentProvider.call() invocations, offering more granular permission control over Uri operations that shouldn't be available through Uri grants. This new design also relaxes the requirement that root information be burned into every Uri. Migrate ExternalDocumentsProvider and DocumentsUI to adopt new API. Bug: 10497206 Change-Id: I6f2b3f519bfd62a9d693223ea5628a971ce2e743
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
6398343e83b3fd11dd6536cf6f390a52c1e19d2e |
|
21-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Return EXIF thumbnails when available. Adds new ExifInterface method to extract the thumbnail range from a larger image file, and use that to return an AssetFileDescriptor. When decoding an AssetFileDescriptor thumbnail with offsets, read out the raw data entirely, since Skia uses lseek() aggressively. Bug: 10412208 Change-Id: I7906cdf82c0c3794cec7043c801a86f66efeb143
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
9d0843df7e3984293dc4ab6ee2f9502e898b63aa |
|
07-May-2013 |
Jeff Sharkey <jsharkey@android.com> |
Resized thumbnails; async; extend MatrixCursor. When requesting thumbnails, check if their dimensions are larger than requested, and downscale to avoid memory pressure. Load them async and with LruCache. Extend MatrixCursor so that RowBuilder can offer() columns without requiring they know the projection map. This makes it easier to respond to query() calls, where the remote side controls the projection map. Use it to handle custom projections in external storage backend. Update date/time formatting to match spec. Bug: 10333418, 10331689 Change-Id: I7e947a8e8068af8a39b55e6766b3241de4f3fc16
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
a5599ef636e37cb0b6474349936999be1afe6987 |
|
16-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Documents management mode; API adjustment. Create documents manage mode to support Downloads and transient storage devices. Locks user into requested backend root, and forces file sizes on and sorting by last modified. Separate API constants for Documents versus Roots, and give concrete MIME types for roots. Treat null sizes as unknown. Documents are always enabled in list so that divider is drawn. Mark external storage file as writable. Bug: 10329983, 10332993, 10332952 Change-Id: I05f4fdf5b04041a38e1ba7fb30202a3b0c615bf6
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
dc2963aecaf38bf53d6de82957412a486049c207 |
|
03-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Track and persist directory stacks; recents work. Move to manual tracking of directory navigation stack so we have Uri data to persist, instead of opaque fragment backstack. Remember directory stacks across launches on a per-app basis. Start recording recently opened and created files. Uniform Uri parameter extraction utility methods in contract. Change-Id: I79ed30ee10272bf7c53d339e797639c993f649bb
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
92d7e697a864a3e18bef4ef256bb3eb339a66b4e |
|
02-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Reference docs by ROOT_ID and DOC_ID; recents. The same document may be present with different sematics under multiple storage roots, so always reference using both ROOT_ID and DOC_ID. This enables backends to revoke permissions for an entire root, such as when an account is removed. Start building provider to remember recently accessed documents. Change-Id: I75befa2e61393dec12fcc7fd27f631fcddae46fa
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
20d96d8aff2193d548977e23ce5158657cac94e0 |
|
31-Jul-2013 |
Jeff Sharkey <jsharkey@android.com> |
Define storage roots, external GUIDs, creation. Allow storage backends to publish multiple roots into the UI, which are defined by a directory GUID, type, and label details. Update external provider to surface a primary external storage root, and switch to burning file path into the returned GUIDs so they remain durable. Added insert, update, and delete support to external provider. Adds file extensions to display names when needed to match MIME type. Add flags for searching and deletion, and extras for Cursor pagination. Add directory creation dialog to UI. Opening a document always gives write access. Change-Id: I9bea1aa0dcde909a5ab86aefeece7451ab920cf1
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|
9e0036ed7d3260d79cc5f9ffd8e3bbe760699924 |
|
27-Apr-2013 |
Jeff Sharkey <jsharkey@android.com> |
External storage provider, document picker UI. Continuing to flesh out storage backends by adding an external storage document backend. Still rough, but it can traverse files and directories. Early pass at OPEN/CREATE_DOC picker UI, which offers to traverse any known storage backends. Supports opening subdirectories and returning a picked file. Change-Id: Idc3554036b3816a93d9b465ee8a620746859d2ae
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
|