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
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
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
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
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
Uses new column to mark writability. Also filter file selection in
create mode to only allow writable files.
Bug: 10667164, 10893268
Change-Id: I90f74efbb7ac634fbdb3cc02a904a96a434d3605
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
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
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
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
Save scroll position and restore when rotating or going up the
directory stack. Also show directory animations when navigating
the directory stack.
Bug: 10417201
Change-Id: Ia2c508debc2bffffe6306eb9078afefef259dfe2
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
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
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
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
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
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
Instead of persisting sort order per-directory, the order is now
sticky for that session. Any user selected sort order takes
precedence over an ordering hinted by a backend.
When a restored DocumentStack is untouched, the back key now leaves
the dialog, instead of popping from the restored stack.
Persist list/grid mode changes async.
Bug: 10659604, 10672973
Change-Id: I9f022a081c014537447c9c2af10e19d8cd9566aa
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
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
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
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
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
Using flags to indicate supported types isn't very extensible, so
use newline-separated MIME types instead.
Bug: 10514613
Change-Id: I45641fc20b423b2a0bb2df7457c274f42aa6861a