summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI/src/com/android/documentsui/RecentsCreateFragment.java
Commit message (Collapse)AuthorAgeFilesLines
* Reduce code duplication between DocumentsActivity and StandaloneActivity.Steve McKay2015-04-221-2/+3
| | | | | | | Ensure StandaloneActivity has toolbar management consistent w/ DocumentsActivity. Introduce a separate SearchManager class since there seemed to be a sufficient body of logic and state to warrant the separation. Change-Id: I87d9da40095c6de575b124005ca34a8c0b0b4b35
* Implement a standalone file manager activity.Steve McKay2015-03-251-4/+4
| | | | Change-Id: Iaf86ef416b979cea4ab3890d3a26f09741392c3d
* Make sure we're obtaining themed drawables correctlyAlan Viverette2014-08-141-2/+1
| | | | Change-Id: I446a3492f7bf5a897c5d698e61327af4b7840d85
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-2/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* When launched into empty recents, show drawer.Jeff Sharkey2013-10-071-0/+5
| | | | | | | | | Pull out drawer to give users more context about meaningful places to navigate to. Also fix bug where restored roots weren't being highlighted. Bug: 10852518 Change-Id: Id294f6923477ca4dc505c4b0a21a5bdf8b722cf4
* New roots UX, async, performance, docs.Jeff Sharkey2013-09-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Handle null stacks gracefully.Jeff Sharkey2013-09-251-1/+2
| | | | | Bug: 10928395 Change-Id: Ie7c3f7e0eb068ece0cf678a5d6346f18a413856b
* Freshen restored stacks, more UX bug fixes.Jeff Sharkey2013-09-241-2/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
* Create unique files, root ordering, UI bugs.Jeff Sharkey2013-09-211-4/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Load RootInfo in background, invalidation.Jeff Sharkey2013-09-191-1/+0
| | | | | | | | | | | | | | | | | Move all RootInfo queries to background threads to avoid janking the UI. Update passes happen on spawed task, which swaps out updated cache results when finished. Support partial updates when only a single package/authority has changed. Watch for change notifications for roots, since flags can change over time. Ignore stopped packages when in background, but query them for roots when launching any picker UI. Optimize management launches by treating as one-shot requests that don't need to wait for all RootInfo. Bug: 10600454, 10745490 Change-Id: Ibc7b15688ef6b41bd7e9dd0d7564b501e60e49a9
* Also catch one more tablet layout NPE.Jeff Sharkey2013-09-191-1/+1
| | | | | Bug: 10837208 Change-Id: I178110431221773658403319b2be7aff22adadc8
* More UX work for thumbnails, search, management.Jeff Sharkey2013-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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
* Disabled states, more UX work, bug fixes.Jeff Sharkey2013-09-091-4/+23
| | | | | | | | | | | | | | | | | | | Fix drawable state to correctly show dimmed disabled state. Update disabled state for all children to grey out text. Block multi-selection of documents not matching MIME filter. Load thumbnails in parallel. Show thumbnails in list mode based on MIME type to match spec. Give each footer a unique view type to avoid recycler crashes. Show breadcrumb icons in recent create paths. Fix timestamp bug when querying/updating recent paths. Make ContentProviderClient.closeQuietly() really be quiet. Bug: 10668364, 10510022, 10668701, 10534224, 10667726 Change-Id: I3c705412fb211519f15ad41a273a7533b878e9e5
* Remember mode and sort on per-directory basis.Jeff Sharkey2013-09-091-8/+7
| | | | | | | | | | | | | | | | | 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
* Item layout tweaking, hook up more assets.Jeff Sharkey2013-09-061-3/+0
| | | | | | | | | | | 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-4/+7
| | | | | | | | | | | | | | | | | | | 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
* Refactoring of DocumentsContract.Jeff Sharkey2013-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Stronger DocumentsProvider contract.Jeff Sharkey2013-08-281-3/+3
| | | | | | | | | | | | | | | | | | | 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
* Request more documents when EXTRA_HAS_MORE.Jeff Sharkey2013-08-181-1/+1
| | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | 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
* Better handling of broken storage providers.Jeff Sharkey2013-08-071-2/+10
| | | | | | | | Begin throwing FNFE when storage provider doesn't know about document or when it's having trouble. Treat all provider errors as FNFE and avoid crashing our UI. Change-Id: I946f1ae4125791999464dc4ce494853d5d1c0629
* Settings, replace files, sorting by size, tweaks.Jeff Sharkey2013-08-071-5/+4
| | | | | | | | | | | | | | | | 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
* Recents in create, uniform item layouts.Jeff Sharkey2013-08-061-0/+209
Show recent directories in a separate fragment, and save as serialized versions of new DirectoryStack. Cleaner behavior around recents and search, instead of treating them as pseudo-Documents. More uniform item layouts between list and grid, including both date and size information, and originating storage root in recents. Avoid clashing directory loaders by assigning unique numbers. Promote list/grid switching up into activity. Change-Id: I9a93460b896067ca036d7e772eeabde31face2e1