History log of /frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c29d2b04927b9d28089d79cbaa63a6a91db1bb5a 30-Jun-2016 Daniel Nishi <dhnishi@google.com> Move the MIME type icon detection into the platform.

This allows the MIME type icons to be used in other system apps.
In this instance, the StorageManager app needs to show file icons
for a given file. By moving the icon mapping into a static library,
we can avoid duplicating the mapping and resources.

Bug: 29826961
Change-Id: Ic2dc7970cc5a5ca430e33425eb9f1ecbd733fe9a
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
ad913ed551accedc07edf802480edb426653a587 11-Apr-2016 Tomasz Mikolajewski <mtomasz@google.com> Remove the toolbar icon from DocumentsUI.

Bug: 27565928
Change-Id: I5181466a770e11716f173cf8cc66f62ba71ac710
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
1719b3555dc9bff5394045585051e7d5684bceb1 21-Mar-2016 Aga Wronska <agawronska@google.com> Add config flag to show/hide internal storage.
Hide internal storage by default.

Revert "Always show intern storage."

This reverts commit 7c4395804e450533afb553ab992c47f737da8a9b.

Bug: 27683276

Change-Id: I04ea8b9a307babcea003f9bec200d41265a42c7f
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.java
ba23e54d263fefaac96b3ce6b068e70ec6f06128 03-Mar-2016 Steve McKay <smckay@google.com> Show proper icons for SD and USB attached storage.

Use USB icon for MTP devices.

Bug: 26883880
Change-Id: I8ce85ffc915a012dca79a5de1cc7c74361776792
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.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/model/RootInfo.java
e2af078488d724b43fb9d423e98c1410c22f670f 18-Feb-2016 Steve McKay <smckay@google.com> UX cleanups.

Visually separate directory background from sidebar.
Lower shadows so the "real" effect isn't so prominent.

Hitchhikders:
Consolidate bool values in config.xml files (were in dimens.xml).
Add missing supportsRecents & supportsSearch methods
to RootInfo.
Rename RecentLoader to RecentsLoader so it doesn't defy
searching for "Recents" string.
Move Downloads below the divider.

Change-Id: I06c76e26ec6df6541860a1448865c67ed953ed43
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.java
a3b936aa55126173302a29c55b89ffc329083979 17-Feb-2016 Steve McKay <smckay@google.com> Merge "Guard against NPE in equals checks." into nyc-dev
30551a257ca39f716a1d83c5cfd64d9c20efa6ad 16-Feb-2016 Steve McKay <smckay@google.com> Guard against NPE in equals checks.

Update State test to cover different conditions separately.
Update DirectoryInfo test to best practices.
Update RootInfo to follow DirectoryInfo equals pattern.
Also, allow null cursors from Model...since they happen...I seen it mahself.

Bug: 27118725
Change-Id: Id0a0be053b91c887a745bfca5416e64f0edba995
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
ab3b8936dc1f4a24cffea422baf9ef51f0de05e7 16-Feb-2016 Steve McKay <smckay@google.com> Remove "HOME" directory. Use "Documents" instead.

Use "Folder" as home icon for now.

Bug:27148009
Change-Id: I9f57bba1c8e51ae7887861923f5baa8f69ec2e6e
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
efa1761776160376278fa467ea31d8e3f621a286 30-Jan-2016 Steve McKay <smckay@google.com> Decouple SD card from ADVANCED storage toggle.

A variety of related fixes:
- don't force size enable when browsing from device mounted notifications.
- don't show settings menu item as action (put in overflow).
- add sd card icon (not quite yet used, need to suss that out).

Bug:26880985,26883578,26771127
Change-Id: I36f153c42217f8092f157ded2a756c02525593ab
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
7587fd0094ef20d5c7c8bd92c2a6eb100516aef3 04-Jan-2016 Aga Wronska <agawronska@google.com> Change Internal Storage icon from sdcard to smartphone

Bug:26143658
Change-Id: I7663a477c8e90e89f8f5dbed1b6f2c1f83e929d1
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
dbdaa49be4958b25beca85cfcd14adf00058701a 02-Dec-2015 Steve McKay <smckay@google.com> Add DownloadsActivity functional test.

Bug: 25809806
Change-Id: I43ceaf3a99715a57e3d349bee60f2edf7f6666bd
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
c6a4cd8c0f35a7e9d126ab09924f8f1f8422182a 18-Nov-2015 Steve McKay <smckay@google.com> Add "Home" directory support.

Update FilesActivityUiTests to verify Home is present
and that clicking a root sets the title accordingly.
Guard addition of WRITABLE flag with a volume test.

Bug: 25147243
Change-Id: Ic20372737cae08a82af0aade0c0dbbd8c22d5f34
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
9094585eb484f0d6fa9e1943dc4dc3943eb33126 06-Nov-2015 Ben Kwa <kenobi@google.com> Adjust grid item layouts to match mocks.

BUG=24326989

Change-Id: I8a4133890036a2ef9173f20828f062a7e991525d
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
abf397458dca89fd3df4234d547a94bf0487033d 23-Oct-2015 Daichi Hirono <hirono@google.com> Show MTP roots at the bottom of root list.

MTP is removable device, so we should show it at the buttom of volume
list.

BUG=24813611

Change-Id: I0b78405ec169d576de4c709bbe21b5bb9b856b87
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.java
0c64308240a7e9d3a78d4dedba2a419da63b5afd 09-Oct-2015 Ben Kwa <kenobi@google.com> Reorganize DocumentsUI roots fragment to match mocks.

BUG=24329078

Change-Id: I80fe7b939772d929236aa9e0e6fa44cdb606a038
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.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/model/RootInfo.java
03d30a573b8bc8e169e153a0fffa053ffedcd5ee 14-Aug-2014 Alan Viverette <alanv@google.com> Make sure we're obtaining themed drawables correctly

Change-Id: I446a3492f7bf5a897c5d698e61327af4b7840d85
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.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/model/RootInfo.java
e37ea6123d1aa3cd3e8804988886b1f6046d79d6 04-Sep-2013 Jeff Sharkey <jsharkey@android.com> Fix document management permission enforcement.

Allow both explicit holders of the MANAGE_DOCUMENTS permission and
those holding Uri grants to perform management tasks.

Extend grants for newly created documents when caller doesn't have
permission. Revoke grants when deleting documents.

Test now writes actual content into picked file. Workaround updated
flags for Drive app.

Bug: 10623211
Change-Id: Ia8e90b33e0fac8294b2cacb96d083c43fdf75aab
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.java
5dfb345df7cb17b3a7e534a80a270b4afe7934da 01-Sep-2013 Jeff Sharkey <jsharkey@android.com> Use Cursors directly when binding documents.

Instead of creating a DocumentInfo for every list item, bind the
adapter against Cursor directly.

Create new SortingCursorWrapper which performs sorting at query time
and keeps a O(1) mapping from sorted to unsorted positions in the
underlying Cursor.

Suppress extra loader passes that had been kicked off. Use unstable
provider when querying to guard against broken providers.

Bug: 10567506, 10510851
Change-Id: I535814da6b17c38de04a1175e0afcc78c6b966ce
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/RootInfo.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/model/RootInfo.java