summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/res/values
Commit message (Collapse)AuthorAgeFilesLines
* Add directory selection to DocumentsProvider.Jeff Sharkey2014-04-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch framework Holo references to Quantum.LightAlan Viverette2014-04-011-2/+2
| | | | Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
* Detect wedged ContentProviders, treat as ANR.Jeff Sharkey2013-10-011-0/+2
| | | | | | | | | | | | | 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
* Freshen restored stacks, more UX bug fixes.Jeff Sharkey2013-09-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | When restoring a persisted stack, such as last location or a location where save occurred, freshen the DocumentStack to get the latest details from backend, and ensure the path is still valid. Filter Recent directories in create mode based on roots allowed by incoming request. Remember when user last picked an external app, and open drawer next time user launches for GET_CONTENT. Fix state list drawable ordering, and avoid clobbering Drawable callback when wrapping in InsetDrawable; tricksy hobbitses! Make grid items smaller to always fit two columns on phones. Draw grid items all the way to screen edge; don't clip to padding. Better error message when folder creation failed. Show Recents in grid mode when picking any visual content, not just images. Bug: 10846100, 10903211, 10898993, 10892808, 10892058, 10892009, 10885012 Change-Id: Ia0f88d911abc6ea03645d6fd3e04271c21d5936a
* Latest UX asset drop, grid padding.Jeff Sharkey2013-09-212-1/+5
| | | | | | | | | | Bring in latest asset drop. Apply grid padding programmatically instead of waiting for asset. Remove alpha from directory animation. Update save footer background to match spec. Bug: 10700025 Change-Id: I8eef08f36d04767b78e91b23f72bdbebfbb02f58
* Latest UX asset drop.Jeff Sharkey2013-09-181-1/+8
| | | | | | | | | | Darker action bar overflow icon, larger grid-mode directory icon, icon for music albums, generic file icon. Fix bug that allowed null MIME types to be picked. Bug: 10700025 Change-Id: I2089678eaf793bc3c7214b21c9de5f38429ebb0f
* DocumentsUI tablet support.Jeff Sharkey2013-09-122-1/+8
| | | | | | | | | | | | | | Shows as a faux dialog on larger tablets, since the normal dialog themes from framework don't support action bars. Instead, this hacks itself to look like a dialog with an InsetDrawable. Detects touches in dim area to dismiss dialog. Show all action bar icons on tablets, and roots panel is always visible with a different shadow. Show settings in dialog. Allow mode switches in recents. Bug: 10329832 Change-Id: Id02982ce7b0d4694962d32f8d5286fdfcc207208
* More tweaks to match UX spec.Jeff Sharkey2013-09-102-4/+62
| | | | | | | | | | | Fixed text colors to match spec. Behold The Greyening! Centered loader spinner in grid mode. Show multiple lines in status messages. Add string descriptions. Fix bug where toggling size setting didn't kick a UI rebind. Bug: 10510022 Change-Id: Icb41ebeb4de0fed8c04fc6cf5213af1587b72641
* Item layout tweaking, hook up more assets.Jeff Sharkey2013-09-062-0/+4
| | | | | | | | | | | Update layouts for items in both list and grid mode to reflect latest UX. Use new card background in grid mode, and apply gradient treatment over thumbnails. Visibly mark currently selected root. Bug: 10510022 Change-Id: I36b290d7082b5cdfd7b3167df7d976032bc01bd6
* Instance state, fix sharing, Durable objects.Jeff Sharkey2013-09-011-0/+2
| | | | | | | | | | | | | | | | | | | Remember instance state across configuration changes, and enable rotation. This remembers current modes and in-progress traversals. Always finish action modes after launching an action. Fix sharing by always putting Uris in extras, and always wrap in a chooser. Find common MIME types when sharing multiple documents. Fix downloads launching by following directory MIME type change. Introduce "Durable" which is like Parcelable, but can be used for both byte[] storage and Parcel transport. Make both DocumentInfo and DocumentStack durable. Disable recents until new behavior is implemented. Bug: 10460236, 10446265, 10533674, 10456344, 10456702 Change-Id: I4eaf2b0b4cde611c69a1e7b5f1586f6b02019b27
* Request more documents when EXTRA_HAS_MORE.Jeff Sharkey2013-08-181-0/+3
| | | | | | | | | | | | | | Implement EXTRA_HAS_MORE and EXTRA_REQUEST_MORE contract with document providers. Providers can include EXTRA_HAS_MORE when additional data is available with additional cost, such as a network request. Listen to content changes based on returned cursor instead of original Uri. Include a test backend to exercise. UX still under development. Bug: 10350207 Change-Id: Iaa8954df55a1a1c0aa96eb8a4fd288e12c2fbb01
* Management actions, invalidate caches.Jeff Sharkey2013-08-181-0/+5
| | | | | | | | | | | | | | 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
* DocumentsUI handles GET_CONTENT; hinting, errors.Jeff Sharkey2013-08-151-0/+1
| | | | | | | | | | | | | | 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
* Settings, replace files, sorting by size, tweaks.Jeff Sharkey2013-08-071-0/+9
| | | | | | | | | | | | | | | | 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
* Storage roots in fragment, sectioned.Jeff Sharkey2013-08-061-0/+4
| | | | | | | | | | 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
* More recents work; filtering and sorting.Jeff Sharkey2013-08-051-0/+2
| | | | | | | | | | | | | | | | Update DirectoryFragment to render List<Document>, making it more general purpose. Feed it documents either from a backend Cursor or after resolving fields from a recents Cursor. Start in recents when no persisted stack available. Synthesize a root for recents. Local directory filtering and sorting using predicates and comparators, all performed on background thread. Introduce UriDerivativeLoader which handles ContentObserver updates while producing a derivative work of a Cursor. Split data model classes into separate files. Change-Id: Idb88b4ee22c58c8e508328e678877f7e4c978533
* XML metadata for storage backend; custom icons.Jeff Sharkey2013-08-011-2/+4
| | | | | | | | | | Introduce XML metadata for storage backends, used to indicate if custom roots should be queried, and provide any custom MIME type icons inside that backend. Parse metadata and resolve custom icons in UI. Change-Id: Iec026c0b10845edff7a345d9389691ddf2c87a0e
* Sliding drawer for roots, move sorting, search.Jeff Sharkey2013-07-311-4/+8
| | | | | | | | Move backend root exploration into sliding drawer, and adjust action bar when moving between modes. Moves sorting into action bar spinner instead of separate dialog. Also add initial search support. Change-Id: I70189911ba56ae6bd93d5c503a8600acd6d6c0c5
* Support sorting in storage UI.Jeff Sharkey2013-07-011-0/+3
| | | | | | | | | | Extract mode information into DisplayState which is now consistent across directory traversal. Use grid mode by default when working with images. Dialog to switch sort order. Add testing UI to exercise until we have real clients. Change-Id: Ic423584d4559732fb3d2aea9e0406b57d43f6e6d
* Support multi-select in storage UI.Jeff Sharkey2013-07-012-2/+24
| | | | | | | | | | When caller has specified that multiple documents are okay, enable multi-select action mode. Currently only allows document selection, not directories. Returns multiple documents through ClipData. Fix bug where GridView was stuck with 2 columns on tablets. Change-Id: Id49b29a86330639b56fa116d37e7f0d874980c5b
* Iterate on storage UI.Jeff Sharkey2013-07-012-0/+30
| | | | | | | | Support both grid and list view of documents. Show breadcrumb navigation trail in action bar. Start supporting file and directory creation. Change-Id: I93a973da7b0d4387a57fe719e7bb20944adb0290
* External storage provider, document picker UI.Jeff Sharkey2013-05-011-0/+19
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