33819318f61224cdda45e5e9a70dc9cdb9f33911 |
|
29-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Suppress OperationCanceledException logging. These exceptions are normal when an app has cancelled an outstanding thumbnail request. Bug: 11385378 Change-Id: I8aed5721b447cda5baf447ac7afd627aa1062863
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
e8c00d8ed477e199b7f8d1b1e2f37e9cf8593372 |
|
16-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Improve DocumentsProvider and contract docs. Bug: 10567557 Change-Id: I71e7f7ad172e9986e58b9c9533b1c948c5530397
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
15be83612c34b65404f15d0feafdb4a329467769 |
|
09-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Support overriding calling package in Documents. Calling package is only used to pick the stack to restore, not for security purposes. This lets other system tools (like Printing) indicate the real caller. Bug: 11149540 Change-Id: I155e32577eaeda7dfcb80a7d84ac3b54f281590a
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
d2e1e810a79ce0988df57c0bcbcd184e14a067b4 |
|
09-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Drop <meta-data> support for DocumentsProviders. Prebuilts have finished migrating to new <intent-filter> based approach. Also update isDocumentUri() to match new definition. Bug: 11109484 Change-Id: Ib95e2c3f5a9ff70b8d5e411f68ad49d1990dae8c
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
85f5f8132015d8a5043ea4413702420d0d157c9f |
|
07-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Add <intent-filter> support to <provider>. For the new documents work, we're only interested in the subset of ContentProviders that actually implement DocumentsContract. Instead of returning all providers, add <intent-filter> support to make it easier to limit the set of returned ProviderInfo. Define a well-known action for DocumentsProviders, and start using it when querying for roots. Continue supporting the old <meta-data> approach until all apps have been updated. Bug: 8599233 Change-Id: I05f049bba21311f5421738002f99ee214447c909
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
9095c5a8236957e677b2b13e42aad71a5b185e4d |
|
04-Oct-2013 |
Jeff Sharkey <jsharkey@android.com> |
Avoid NPE when ProviderInfo is missing. Bug: 11052428 Change-Id: I6cb0cf2030a28f571c3f13cd0b9ba76627974697
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
7aa7601c09ab5d87cc15a0ed9a8f511d494a4cbc |
|
30-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Detect wedged ContentProviders, treat as ANR. All ContentProvider calls are currently blocking, making it hard for an app to recover when a remote provider is wedged. This change adds hidden support to ContentProviderClient to timeout remote calls, treating them as ANRs. This behavior is disabled by default. Update DocumentsUI to use a 20 second timeout whenever interacting with a storage provider. Bug: 10993301, 10819461, 10852518 Change-Id: I10fa3c425c6a7225fff9cb7a0a07659028230cd3
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
ee2f7df9ee8a4f43c3b0858bad08a4f0a59a627f |
|
26-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Tighten flags enforcement, API to test Uris. Check and throw if callers request invalid grant flags. Add API to test if a Uri is backend by a DocumentsProvider. Bug: 10919391, 10935608 Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
e66c1778f80f4b18e29e018eca3a338f125f23b9 |
|
20-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Require that persistable Uri permissions be taken. Change our Intent flag to indicate that a Uri permission grant is persistable, but don't actually persist it until explicitly taken by the receiving app. This prevents apps from spamming each other if persisted permissions aren't really required. Remember the last time a persisted grant was taken by an app, and use this to prune away the oldest grants when the number of grants grows too large. Allow apps to query persisted grants they are holding, and allow them to release previously persisted grants. Add public UriPermission class to return grant details and timestamp. Track various permission strengths separately, and combine together after each mutation pass. Persistable grants are currently treated like global grants, but they could be moved to have owners in the future. Require that grant holders trying to extend a persistable permission actually hold a persistable permission themselves. Bug: 10835779 Change-Id: I95b2f797c04ce7fd2612f9a644685dbd44e03759
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
f6db154975ef575479ba4ab59d80bcf592288252 |
|
13-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
More UX updates around picking images. When picking images or videos, hide the titles in recents, since the thumbnails should speak for themselves. Also respect new flag that allows a directory to request their titles be hidden. Show directory icon hint in grid mode when showing a thumbnail, to remind user it's a directory. Filter directories out of recents. Hide most action bar icons on phones, even when room. Only show drawer on first launch. Hide most drawer headers to match spec. Bug: 10710331 Change-Id: I0ef1973ddd62750f57345336388366eda1449720
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
de2b22fbc60b29dd8af60cf05862066c04559dc0 |
|
12-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Handle pipe thumbnails, acquire unstable refs. Support decoding thumbnails delivered over pipes by wrapping in a buffered stream. Also switch to using unstable provider references to avoid crashing DocumentsUI. Bug: 10516148, 10510851 Change-Id: I85f6eeaca70c97742bf79656d1d0c6da381fdd47
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
d182bb641f228b2d28527a6aa86075f6358ab838 |
|
07-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Remember mode and sort on per-directory basis. Persist the last user-selected list/grid mode and sort order for each directory. Remembered user choice always overrides provider hinting. Filter out recent documents that don't match requested MIME type, and show recents in grid mode when picking images. Hide mode and sort order in recents. Add hinting flag for backend to indicate a directory would like to be sorted by last modified. Include explicit root in DocumentStack and clearly mark derived fields. Bug: 10392047, 10608506 Change-Id: I2dd3a0e4112852ebf87e7dbb08b3781c86587dcf
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
a61dc8e03e6e863005b3a4629ca8f3801d33d3c4 |
|
06-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Separate root and document management. Two hidden intents for managing roots and documents, used to support Downloads UI. Touching an item tries launching as MANAGE_DOCUMENT first before falling back to VIEW. Provide MIME type for roots. Bug: 10446265, 10531347, 10599641 Change-Id: Ia5584bd6ce3e5a9b0048e8caf1447e3053664413
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
923396b7720367ec99c889725fddfa556e703971 |
|
05-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
Filter roots based on supported MIME types. Using flags to indicate supported types isn't very extensible, so use newline-separated MIME types instead. Bug: 10514613 Change-Id: I45641fc20b423b2a0bb2df7457c274f42aa6861a
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
251097b3789632000ccdaf7fb7d66a82ff37d882 |
|
03-Sep-2013 |
Jeff Sharkey <jsharkey@android.com> |
New recents behavior to match spec. Updated behavior queries each documents root for recently modified documents. It uses a new variant of DirectoryLoader which limits the maximum number of parallel queries to relieve memory pressure. When first started, it waits up to 500ms for everyone to finish, then publishes whatever results are ready, and then refreshes results as each straggler finishes. New RootCursorWrapper that always blends in authority and rootId columns, which are used for binding root details from blended cursors. Bug: 10593596, 10329994 Change-Id: Icc0d4a2f1b6166edc72f78a4c88f444eeba6f2f0
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
bd3b902567b09379e1b62c60b3319ad82102efad |
|
21-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Add CancellationSignal support to file operations. Since ContentProvider file operations can end up doing substantial network I/O before returning the file, allow clients to cancel their file requests with CancellationSignal. Ideally this would only be needed for openFile(), but ContentResolver heavily relies on openAssetFile() and openTypedAssetFile() for common cases. Also improve documentation to mention reliable ParcelFileDescriptors and encourage developers to move away from "rw" combination modes, since they restrict provider flexibility. Mention more about places where pipes or socket pairs could be returned. Improve DocumentsContract documentation. Bug: 10329944 Change-Id: I49b2825ea433eb051624c4da3b77612fe3ffc99c
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
4eb407a832b7d6a2d62a535e5cab70b00a0bc8ed |
|
19-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Management actions, invalidate caches. In manage mode, touching launches a VIEW intent for the file. Also adds actions for sharing and deleting. Move roots and thumbnail caches into Application object, and flush cache when thumbnail size changes. Listen for package changes and broadcasts that should invalidate our roots cache. Pick default grid/list mode based on provider hint. Bug: 10329983, 10330210, 10378834, 10330069 Change-Id: I75afb1c58ab71bb9d55852b1059da7257a376248
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
54ca29a5b94c2edf461c5433825d4ae17469fd7c |
|
15-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
DocumentsUI handles GET_CONTENT; hinting, errors. Document browser now takes over all GET_CONTENT requests that request openable Uris. It shows both storage backends and includes other apps that respond to GET_CONTENT. Only grants transient read permissions. Better guarding against throwing storage backends. Send sort order and local-only hinting to backends. Require that OPEN/CREATE_DOC users include openable category. Bug: 10330112, 10329976, 10340741, 10331689, 10329971 Change-Id: Ieb8768a6d71201816046f4a4c48832061a313c28
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
5b83f854d9cbd6dc9e5a31892dbe8515b4c29683 |
|
15-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Root invalidation, write and grid flags, local. Flags to indicate write support, and to indicate that a grid view is preferred. Method to inform system that any root caches should be invalidated. Methods to mark a Uri as requesting "local only" data. Helper method for document creation. Bug: 10330069, 10330108, 10330210, 10329976 Change-Id: I6ce6160f6ce6621e6ea05848a31bbbcb84587671
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
08da7a1143b0c9cfb703971d882e0886bbd7d9de |
|
12-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
API to discover granted Uri permissions. Now that granted Uri permissions can be persisted across reboots, offer APIs to discover them. Returns incoming or outgoing grants matching the requested flags and mask. Add helper method to discover "open" documents using this new API and filtering for non-documents. Require that callers own at least of the filtering packages to avoid exposing all grants. Switch internal grant tracking to use ArrayMap. Change-Id: I0a755f221d0d160b411f8d3cfc48279b64345733
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
9fb567b59112f99e64e0bff6f343188331bad28d |
|
08-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Settings, replace files, sorting by size, tweaks. Add settings to show file sizes and advanced storage devices, both disabled by default. Add sorting by size when enabled in settings. Always show all documents, but only allow selection when they match MIME filter. When creating, select entire filename on focus. When creating, treat selected documents as replacement targets using that exact Uri unless display name is changed. Show available bytes for device roots. Show empty text label in empty directories. Split grid backend and details into two separate lines. Fix path label ordering when rendering recent directories. Change-Id: I44c62e8adb8ca7d4355510a13d1ba975196a2d29
/frameworks/base/core/java/android/provider/DocumentsContract.java
|
66516697a29cf00d93893a1011d3befc7c1ee37f |
|
06-Aug-2013 |
Jeff Sharkey <jsharkey@android.com> |
Storage roots in fragment, sectioned. Move storage roots into a fragment, since it's not a drawer on tablets. Cluster and sort roots when displaying. SectionedListAdapter to make clustered roots easier to manage. Add docs for root types. Move roots cache into separate class to make it easier to share. Change-Id: Ia0b92eade059e816324641f600c08026c0e268c9
/frameworks/base/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.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/core/java/android/provider/DocumentsContract.java
|
9ecfee03fa188aebfbd9778b4e020323903495ee |
|
19-Apr-2013 |
Jeff Sharkey <jsharkey@android.com> |
Start fleshing out new storage APIs. Introduces new DocumentsContract which storage backends must implement. Backends surface a simple directory-like organizational structure that enables a document to appear at multiple locations in that hierarchy. Querying a document or the contents of a directory will return a Cursor populated with DocumentColumns, which includes simple metadata. Adds new OPEN_DOC and CREATE_DOC Intents, and permission to protect storage backends. Change-Id: Ib4984bc980182b2cedbe552908e5be94604ef085
/frameworks/base/core/java/android/provider/DocumentsContract.java
|