Show directory animations coming in from left-side when in RTL
language. Also fix NinePatchDrawable to correctly mirror its padding
when auto-mirrored, and fix InsetDrawable to propagate the layout
direction to the wrapped Drawable.
Bug: 10987190, 11030793
Change-Id: I1213802a07d0c4ced93438df1e6ddf5aed3df677
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
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
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
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
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
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
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
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
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
A provider can include extras in their Cursors to indicate that
loading is ongoing, or include an error or informational message,
which are now shown in footer views.
Fix registration to always get change notifications.
Test provider that verifies common provider behavior of holding
a reference to "cloud" resources that are released by GC when the
remote Cursor is closed. Also used to validate Recents behavior
for slow providers.
Bug: 10599268
Change-Id: I331c31058dbb80261e7d279b851197c65ac87e32
Change action bar to match current design; drawer is always available
and navigation dropdown is used to interact with current traversal
path in hierarchy. On first launch, show recents with drawer
expanded. On subsequent launches, resume from last location with
drawer closed. If last location root isn't applicable, then behave
like initial launch. Move sort order into action bar submenu.
Delete documents using contract. Use unstable provider when
inflating DocumentInfo from Uri.
Bug: 10330219, 10510851
Change-Id: I6e94637d70ebca156a6c5d50272e878156d0dd62
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
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
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
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
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
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
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
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