History log of /frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e597323939c85f1e7e32272250b790e4d9e234e6 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Terminate DocumentsUI opened for the specific root." into nyc-dev
99900a0e586dc474df52a2f9dda1379170d7e669 19-Apr-2016 Daichi Hirono <hirono@google.com> Terminate DocumentsUI opened for the specific root.

If USB is opened in DocumentsUI from storage settings and format it from
context menu, a user expects it goes back to storage settings after
formatting the storage. However, previous we show Downloads as a result
of redirect from the previous USB storage.

The CL changes the logic for callback so that it finishes the activity
if DocumentsUI is opened for the specific root and the root was removed
while a user stays at the root.

Fixes: 28246076
Change-Id: I5548152fc27fd13bd9b75b3083bcfbdd9f93509e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
00c9815d942265719de92a19e243c1c970929210 19-Apr-2016 Steve McKay <smckay@google.com> Merge "Handle null uris in content changed events." into nyc-dev
757fa1b684c0e14c122a3dc3a308bef66d5bfb63 19-Apr-2016 Steve McKay <smckay@google.com> Handle null uris in content changed events.

Bug: 28244958
Change-Id: Id3a7adb0ab4a751cfcf6ed3fee4cc6337ce512bb
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
30616fcd21076f87c1bfef8f6e0a394657f8e78f 15-Apr-2016 Tomasz Mikolajewski <mtomasz@google.com> Fallback to Recents when Downloads is not available.

Bug: 28182647
Change-Id: I0ece028f7980c7e55ca64d5aa34e98bdb4d08176
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
a3ebfec731c2f1fcc67ecf58d4634e957b044cba 04-Apr-2016 Jeff Sharkey <jsharkey@android.com> Invalidate caches when locale changes.

When loading roots for the first time, we're okay using any cached
data from the system, but if the locale changes we need to
force-refresh everything.

Now that we're always using the system cache, we have a nice strong
signal for "empty" versus "not cached" results, so we don't need to
wait around for the first loading pass to finish.

Add logic to invalidate system cache when locale changes, and fix
locking bug.

Bug: 27977906
Change-Id: Ic50083eff360bea887799583f6c9f02c129eec91
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
276dcd7314c7ad8ebe46bfc5290853fabd1c6316 31-Mar-2016 Aga Wronska <agawronska@google.com> Merge "Add menu option to show/hide internal storage." into nyc-dev
774cc932fc29705c9580775abf7c1e7a80c2bbe3 31-Mar-2016 Aga Wronska <agawronska@google.com> Add menu option to show/hide internal storage.

This reverts commit 7c4395804e450533afb553ab992c47f737da8a9b.

Bug: 27683276
Change-Id: Id1a310b57ab7fa3c8c14b464786473f211eaf41f
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
7732e1e544e89d4a79368c0025901da62f7226a5 31-Mar-2016 Jeff Sharkey <jsharkey@android.com> Fix RootsCache invalidation bugs.

When RootsCache is still running and it detects a provider/package
change, it needs to force reload roots. Also fix cache invalidation
bug in ContentService to allow for Uri prefix matches.

Mark internal storage broadcasts with flag to bypass new background
checks.

Bug: 27759529
Change-Id: I9d9c6fe15d8640ff56ae7214afb3bac673682c28
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
8731408b11a24e3a92188653548f2c90bf866a32 12-Mar-2016 Jeff Sharkey <jsharkey@android.com> Offer to cache ContentResolver-related Bundles.

There are a handful of core system services that collect data from
third-party ContentProviders by spinning them up and then caching the
results locally in memory. However, if those apps are killed due to
low-memory pressure, they lose that cached data and have to collect
it again from scratch. It's impossible for those apps to maintain a
correct cache when not running, since they'll miss out on Uri change
notifications.

To work around this, this change introducing a narrowly-scoped
caching mechanism that maps from Uris to Bundles. The cache is
isolated per-user and per-calling-package, and internally it's
optimized to keep the Uri notification flow as fast as possible.
Each Bundle is invalidated whenever a notification event for a Uri
key is sent, or when the package hosting the provider is changed.

This change also wires up DocumentsUI to use this new mechanism,
which improves cold-start performance from 3300ms to 1800ms. The
more DocumentsProviders a system has, the more pronounced this
benefit is. Use BOOT_COMPLETED to build the cache at boot.

Add more permission docs, send a missing extra in DATA_CLEARED
broadcast.

Bug: 18406595
Change-Id: If3eae14bb3c69a8b83a65f530e081efc3b34d4bc
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
7c4395804e450533afb553ab992c47f737da8a9b 02-Mar-2016 Steve McKay <smckay@google.com> Always show intern storage.

Only show debug root when devel mode is enabled.
Remove all traces of "advanced".

Bug: 27297398

Change-Id: Ie7e8be282531bd245351d56ababa8ca625c10fd2
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
de5ec832b10b155d1d61de4eedb5171da3a76a9c 02-Mar-2016 Steve McKay <smckay@google.com> Merge "Fix roots filtering for move operations." into nyc-dev
ea9ec291ed90a89970f375f6f46e26a1ddc4f451 02-Mar-2016 Steve McKay <smckay@google.com> Fix roots filtering for move operations.

Add test coverage for the Downloads case.
This was a regression to my recent cleanup of RootInfo.
Fixed logic to not exclude basically *everything* when a
directory is in the set of files to be copied.

Bug: 27303346
Change-Id: I4d5608e0d8d95448b027b20107a11a7a5e46d45e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
355d82b67e3b4307680f5dcfe901d9b818e2c34d 01-Mar-2016 Steve McKay <smckay@google.com> Don't assert against Recents title.

It was causing a failure.

Bug: 27383076
Change-Id: Ieb4693783831443e05f32333c181371b0eb4fb93
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
a1f7680f535a30aa816d129c072870031c8a2eb6 25-Feb-2016 Steve McKay <smckay@google.com> Update preconditions to be asserts...

Which are now supported by Jack.
Retain a few preconditions checks that enforce contract.
Disable the one assert we had...because it failed in tests.

Change-Id: I2f6cb01e1af1534be4428ce4a3ee625a163dd163
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
327c31383f8b03a3dc353cb0111b1d1699cc8968 27-Feb-2016 Steve McKay <smckay@google.com> Mark Recents as supporting CREATE.

Allows Recents as copy/move destination.
Allows Recents (create fragment) for CREATE actions.

Change-Id: I46c4792470d2361c62b26e4a66521d56ce3da474
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
008e948c3eac913ae3321bd690e3913e468e7fb1 19-Feb-2016 Steve McKay <smckay@google.com> Undo generalization isDownloads > supportsChildren.

Move root comparison logic into RootInfo.
Move shared string comparison code to Shared.

Change-Id: I3267b496a165ad3cae773783db0e79df2eb118e8
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
4a1ca86f4757647b62995eede2a45d06273503bf 18-Feb-2016 Steve McKay <smckay@google.com> Don't show recents as copy/move destination.

Revoke "SUPPORTS_CREATE" from the Recents faux-Root.
Don't allow copy to roots that don't support children.
Add friendly access methods to Root info for checking flags.
Only show spacer between roots sections when both non-empty.
Add docs explaining the "apps" section in roots.
Improve logic in the "canCopy" method.

Bug: 27232639
Change-Id: If78ee0ff73f0788de863345b560aecd41b23dfb9
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
df676dc0157165715b41ad0a917ba57798906660 03-Feb-2016 Tomasz Mikolajewski <mtomasz@google.com> Do not load Download roots multiple times.

Change-Id: I26685db7fc7a4fb98db695ba6e0e351974eadd6c
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
a6120da1e37a4457bac58f8900bffa795dc8e7cb 27-Jan-2016 Tomasz Mikolajewski <mtomasz@google.com> Open zip files nicely from the Download app with Files app.

Bug: 26321218
Change-Id: I8a7a7e914d290ea1b6f424ee5fbd38a4b09c362d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
60e9a075579a3f5c7713bff6015b4021e33410a4 25-Dec-2015 Daichi Hirono <hirono@google.com> Leave from the current root when the root is removed.

This is needed to handle removable roots.

1. Add a listener to RootCache.
2. BaseActivity handles roots change and leaves from the current
directory if the current root is removed.

BUG=26316940
Change-Id: I41921fe17782fa1a2d9e58f55ea84326b8f1d3c0
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
84cebbeb69e5b473f0cb4d1575bdc57aac48e32e 25-Sep-2015 Ben Kwa <kenobi@google.com> Open the destination dir when a copy notification is tapped.

- Cleanup: rename the "open copy destination" action to "pick copy
destination", which better reflects what it does.
- Move DocumentsIntent from BaseActivity to Shared.
- Rename ACTION_BROWSE_DOCUMENT_ROOT to ACTION_BROWSE for general browsing.
- Use the new ACTION_BROWSE to open the copy destination when copy
notifications are tapped.

BUG=23137963

Change-Id: I10480b45a16ce716febac5453cb5015d26bb0062
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
b2865d233971014759b9b35260b28045adb47348 13-Oct-2015 Ben Kwa <kenobi@google.com> Fix the position of the "Recents" root in DocumentsUI.

BUG=24329078

Change-Id: Ia71b80b2075b34076c4f7802bcc45a13e95775e6
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
ecfbd3edcf07da7b221129a8dfe342cdafbd52eb 25-Sep-2015 Steve McKay <smckay@google.com> Merge "Move State to a separate file."
0200e3463782aee4d87654cb1bd6229784ca755e 24-Sep-2015 Steve McKay <smckay@google.com> Show empty roots except for content pickers.

Bug: 24140864

Change-Id: I9fae80a1e3d413e97ee099bee9c59f81f713cf27
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
7a3b88cf56ded3afb9bd6d1ad150b2d6b1f2f4d7 24-Sep-2015 Steve McKay <smckay@google.com> Move State to a separate file.

Update remaining local DEBUG definitions to use Shared.DEBUG.

Change-Id: I3ed4d4b184836da161adff14bd3d9ca01b435847
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
83df8c072ddd01a5adc11da0869103c4645e6d76 17-Sep-2015 Steve McKay <smckay@google.com> Merge BROWSE and BROWSE_ALL actions.

Open Files app when exploring from settings.
Force visibility of file size in this mode.
Don't hide empty media providers.

Bug: 24136618, 24140864
Change-Id: I6f238586725f9b6255812e3082bb8d8655219a7d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
58efce36cd1b26006e08ddd696292bf06fc34c81 20-Aug-2015 Steve McKay <smckay@google.com> Use type inference where possible.

Normalize use of Annotations like VisibleForTesting, Nullable and so on.
Also, fix a small issue where we were not doubling the marging on cells when calculating columns for grid view.

Change-Id: Ia02f683c2682fa8d0963d13f253a359911d27965
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
77797400ec103b1691e1c3fa602c329b49ac18ca 30-May-2015 Ben Kwa <kenobi@google.com> Enable apps to exclude their own roots from the DocumentsUI roots list.

- Add DocumentsContract.EXTRA_EXCLUDE_SELF (boolean extra)
- Add code to DocumentsActivity to cache the providers of the calling
app if EXTRA_EXCLUDE_SELF is set on incoming Intents.
- Add code to RootsCache to exclude roots from the calling app.
- Add code to allow only system apps to use EXTRA_PACKAGE_NAME.

Change-Id: Ia7cc2a1a297676c7b26f6e583042a4607d8c9a4e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
9be34298be02783b4cc91cf1784aa0627cf36012 14-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Filter out downloads root if the source documents include directory.

This is the short term solution for the downloads root, which does not support
directory creation. For the long term solution, we need to add a flag to Root
model to check if the root support directory creation or not.

BUG=20186663

Change-Id: I15c4795892f38e3f968776f732a6f2160ae775fc
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
bbe2292bc671f74d77c9a0e4e0e1d5ea5714d939 10-Apr-2015 Daichi Hirono <hirono@google.com> DocumentsUI: Add new private intent action to select copy destination.

The CL adds INTENT_ACTION_OPEN_COPY_DESTINATION, and implements the behavior to
respond the intent action.

The directory picker:
* filter out read only roots
* return document URI instead of document tree URI
for the intent action.

BUG=b:20146034
Change-Id: I96c565100c3cdaa57cc7abd8cf6d895d148941a7
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
e934ce6f8430f50d1d22bccd3b341b982f5541ee 25-Mar-2015 Steve McKay <smckay@google.com> Implement a standalone file manager activity.

Change-Id: Iaf86ef416b979cea4ab3890d3a26f09741392c3d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
c9d7150680e288f848178fc6c44776c61ddc8548 10-Sep-2014 Jeff Sharkey <jsharkey@android.com> Manage mode shouldn't block for other providers.

When loading DocumentsUI in management mode (for Downloads), we
normally focus on a single authority and let the other providers
keep loading async. However, when one of the providers kicks a
change notification, we end up blocking the main thread.

Simple fix is to move the blocking into the AsyncTask.

Bug: 17452691
Change-Id: Ie5212ad825b7df719690b29941c9ae9ba2cabe4b
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
cbce47001e15be85b084c36a64c20039a0c4a667 30-Aug-2014 Jeff Sharkey <jsharkey@android.com> Final pass at Material DocumentsUI.

Now with treatment for disabled and selected grid items. Inverts
text and icons in selected drawer items. Follows upstream color
changes to accent color. Disables some verbose logging.

Bug: 15836082, 17281688
Change-Id: I97a1c055a2f1a537388a8f5669147618e9698870
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
c29dd61cbfc9f073239bdce3f4fe397deae2c623 08-Aug-2014 Jeff Sharkey <jsharkey@android.com> More material updates to DocumentsUI.

All assets cut as alpha variants so we apply desired tinting at
runtime. Small script to automatically generate XML resources.

Bug: 15836082, 16658537
Change-Id: I803b3f0bf6f121194a5445fd1c6600fabaf28f60
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
a847d79310320ae8adbedb281123a0f879c2fc6e 30-Jul-2014 Jeff Sharkey <jsharkey@android.com> Light icons for DocumentsUI.

In some cases we want to show light variants. Also tweak drawer
sizes and grid padding.

Bug: 15836082
Change-Id: Ic6459ff0533a7d346c03db5d7deb3d6da42e7649
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
6963148e226dfadc48c36da7db14ee4587a62f6a 28-Jul-2014 Jeff Sharkey <jsharkey@android.com> First pass at Materializing DocumentsUI!

Initial Material asset drop, which still needs some tweaking. Moved
back to framework list item selectors, giving us ripples. Using
accent color overlay for activated items. Align all items to new
Material grid, including insetting list divider and resizing list
items on wide screens.

Fix obscure RTL drawing bug.

Still lots of work left.

Bug: 15836082
Change-Id: I729cc7dcb0271ee62b55d1e036fc28427fc0dd3d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
b9fbb7290b02de1ce621deaa2d28a5e42f2e0937 05-Jun-2014 Jeff Sharkey <jsharkey@android.com> Refactor directory API to "opening document tree."

Cleans up API so it consistently refers to opening or working with a
subtree of documents. Also separates isChildDocument() support from
the concept of directory tree selection.

Bug: 15429194
Change-Id: Ice66a751ff4bd0cc4d34c44c5da13a0dc4186dc9
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
21de56a94668e0fda1b8bb4ee4f99a09b40d28fd 06-Apr-2014 Jeff Sharkey <jsharkey@android.com> Add directory selection to DocumentsProvider.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
e6585b32ea586743258a5457e2184ffc087f2d2f 13-Dec-2013 Kenny Root <kroot@google.com> Use java.util.Objects instead on internal API

Not needed since java.util.Objects implements all the needed
functionality.

Change-Id: Icd31d49a9801d1705427f028e9ac927d58e7d34c
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
46de7b50243d3896fe97d1ee7a00258085cea1ca 23-Oct-2013 Jeff Sharkey <jsharkey@android.com> Update roots when data cleared, refresh UI.

Data cleared usually means accounts went away, so kick off roots
refresh. Also update any visible UI after a refresh finishes.

Bug: 10899793
Change-Id: Id68c80b5e635e358cfd75f4961ce13cd1c7c5f82
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
5545f56f7561810187545a1817b6001dd1f9931b 21-Sep-2013 Jeff Sharkey <jsharkey@android.com> Create unique files, root ordering, UI bugs.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
a9ce049db87259e302e2368d2a4a1c11a94fd831 20-Sep-2013 Jeff Sharkey <jsharkey@android.com> Load RootInfo in background, invalidation.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
6d97d3c1a2ebac4e3f32c7e5bc134864ace1c17f 06-Sep-2013 Jeff Sharkey <jsharkey@android.com> Another asset drop, provider icons, tests.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
0b14db3cf5eac43736462999337c9a3efdc1ac81 05-Sep-2013 Jeff Sharkey <jsharkey@android.com> Asset drop, icons for common MIME types.

Bring in latest assets from UX. Map common MIME types to specific
icons.

Bug: 10510022
Change-Id: I01ea8749ca5515a04efcbc15eb0c8cbb43e5e7ad
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
348ad6866b91afa4d59d45df533ef88094c74d13 03-Sep-2013 Jeff Sharkey <jsharkey@android.com> Filter roots based on incoming request.

When incoming request is for local-only content, or for ACTION_CREATE,
only include roots advertise those features.

Filters roots based on the allowed MIME types and the supported types
advertised by each root. This supports displaying Images and Audio
roots only when requesting those content types. Applies the same
filter when deciding which roots to query for recents.

Fixes advanced filtering instead of limiting to just devices. Update
sorting so that Recent always appears first. Add testing support for
LOCAL_ONLY.

Bug: 10597317, 10526535
Change-Id: Ic5ccf475c4fe93fd52b29388d369d7f6915c0c42
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
b51331116eb2ebbc41aaf69142916f9af6dffdd5 02-Sep-2013 Jeff Sharkey <jsharkey@android.com> Instance state, fix sharing, Durable objects.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
b156f4bf8cdfe475a7116b627d84a281e1a281b7 07-Aug-2013 Jeff Sharkey <jsharkey@android.com> Recents in create, uniform item layouts.

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
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/RootsCache.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/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java