82 Commits

Author SHA1 Message Date
Jeff Sharkey
ba0591c9e3 am 21d8e96d: am ef4c3790: am 27d3c0fe: Merge "Isolate calls to each remote DocumentsProvider." into klp-dev
* commit '21d8e96d840be42fae56483a2e291fc10677b2d9':
  Isolate calls to each remote DocumentsProvider.
2013-10-02 10:15:14 -07:00
Jeff Sharkey
21d8e96d84 am ef4c3790: am 27d3c0fe: Merge "Isolate calls to each remote DocumentsProvider." into klp-dev
* commit 'ef4c3790e52beab467359f6b5125b66fbe1993ef':
  Isolate calls to each remote DocumentsProvider.
2013-10-02 10:11:18 -07:00
Jeff Sharkey
b6ab3b982b am 7f60e70e: am 666b998b: am 364fc14f: Merge "Detect wedged ContentProviders, treat as ANR." into klp-dev
* commit '7f60e70e815d381035b141843395830407c198d9':
  Detect wedged ContentProviders, treat as ANR.
2013-10-02 09:43:21 -07:00
Jeff Sharkey
7f60e70e81 am 666b998b: am 364fc14f: Merge "Detect wedged ContentProviders, treat as ANR." into klp-dev
* commit '666b998b67fe7bb6fc11dd6d683a18b5690afd39':
  Detect wedged ContentProviders, treat as ANR.
2013-10-02 09:35:14 -07:00
Jeff Sharkey
d01571e6d4 Isolate calls to each remote DocumentsProvider.
All background work is going through AsyncTasks, which uses a shared
thread pool.  Even with the new ContentProviderClient logic to detect
ANRs, the UI can still appear to be unresponsive for 20 seconds, even
if the user attempted to switch to a different backend.  In the worst
case, a backlog of thumbnail requests would end up wedging Loaders
for a long time, since they all share the same THREAD_POOL_EXECUTOR.

This change isolates calls to each provider onto their own thread,
which they're free to wedge and recover from over time.

It also means we no longer need a dedicated thread pool for recents
loading, and can use a simpler Semaphore instead.

Disables thumbnails in recents on svelte devices.

Bug: 10993301, 11014856
Change-Id: I7f8a5bbb5f64437e006cb2c48b7e854136d5c38c
2013-10-02 08:54:02 -07:00
Jeff Sharkey
7aa7601c09 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
2013-10-01 09:50:41 -07:00
Jeff Sharkey
a2c42861a1 am cc637d9a: Merge "New roots UX, async, performance, docs." into klp-dev
* commit 'cc637d9ae5920ac2f685090f595dc1e1643d71cc':
  New roots UX, async, performance, docs.
2013-09-30 17:09:48 -07:00
Jeff Sharkey
b8e2f178e9 am cc637d9a: Merge "New roots UX, async, performance, docs." into klp-dev
* commit 'cc637d9ae5920ac2f685090f595dc1e1643d71cc':
  New roots UX, async, performance, docs.
2013-09-30 14:17:44 -07:00
Jeff Sharkey
6efba22ce5 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
2013-09-27 17:13:13 -07:00
Jeff Sharkey
8aa0c34483 am cd30bb6c: am bb77d99c: Merge "Directories are always enabled; update assets." into klp-dev
* commit 'cd30bb6c710d40839bc8b4d6edcb866f13342b5a':
  Directories are always enabled; update assets.
2013-09-26 11:05:44 -07:00
Jeff Sharkey
cd30bb6c71 am bb77d99c: Merge "Directories are always enabled; update assets." into klp-dev
* commit 'bb77d99c257bc4a3371548c4bc8ba7088fa76005':
  Directories are always enabled; update assets.
2013-09-26 11:00:48 -07:00
Jeff Sharkey
2a030b05a9 Directories are always enabled; update assets.
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
2013-09-26 10:54:19 -07:00
Jeff Sharkey
a440a0dd64 am b8a48da2: am 5e1a5e5b: Merge "Create unique files, root ordering, UI bugs." into klp-dev
* commit 'b8a48da2a707720a105584f1b8dc087a6dd9c887':
  Create unique files, root ordering, UI bugs.
2013-09-22 12:59:40 -07:00
Jeff Sharkey
b8a48da2a7 am 5e1a5e5b: Merge "Create unique files, root ordering, UI bugs." into klp-dev
* commit '5e1a5e5bad475696e842addceb7dd6a519879f98':
  Create unique files, root ordering, UI bugs.
2013-09-22 12:57:20 -07:00
Jeff Sharkey
5e1a5e5bad Merge "Create unique files, root ordering, UI bugs." into klp-dev 2013-09-22 19:55:19 +00:00
Jeff Sharkey
5545f56f75 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
2013-09-21 14:07:16 -07:00
Adam Lesinski
5fc67f98b9 am a35ff661: am d473ebb7: Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev
* commit 'a35ff66127d07117e93268482d7e9719abfd58c3':
  Surfaces ParcelFileDescriptor#parseMode() as API
2013-09-20 16:05:21 -07:00
Adam Lesinski
a35ff66127 am d473ebb7: Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev
* commit 'd473ebb7c4f212cb9f74fe748bb8b95d7d126417':
  Surfaces ParcelFileDescriptor#parseMode() as API
2013-09-20 16:01:34 -07:00
Adam Lesinski
d473ebb7c4 Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev 2013-09-20 22:59:12 +00:00
Adam Lesinski
eb8c3f93ed Surfaces ParcelFileDescriptor#parseMode() as API
Moves ContentResolver#modeToMode() to ParcelFileDescriptor#parseMode()

bug:10711271
Change-Id: I28a5de4ca70adfbec4caf739863b77f0fd7fd9a4
2013-09-20 14:59:34 -07:00
Jeff Sharkey
f97d4681d3 am 89dec7e6: am a9ce049d: Load RootInfo in background, invalidation.
* commit '89dec7e6e9ab98141de89096ef052cb2c158c557':
  Load RootInfo in background, invalidation.
2013-09-20 11:21:26 -07:00
Jeff Sharkey
89dec7e6e9 am a9ce049d: Load RootInfo in background, invalidation.
* commit 'a9ce049db87259e302e2368d2a4a1c11a94fd831':
  Load RootInfo in background, invalidation.
2013-09-19 19:59:22 -07:00
Jeff Sharkey
a9ce049db8 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
2013-09-19 19:53:32 -07:00
Baligh Uddin
b3a0c4fdec Import translations. DO NOT MERGE
Change-Id: I75cbdcca61cb05f29e4463284be324e684df51bd
Auto-generated-cl: translation import
2013-09-18 23:43:42 -07:00
Baligh Uddin
59db60e498 Import translations. DO NOT MERGE
Change-Id: I0da9befa56ba6e4a599b5796182898cc7093043d
Auto-generated-cl: translation import
2013-09-18 23:42:59 -07:00
Baligh Uddin
fd14da3535 Import translations. DO NOT MERGE
Change-Id: I6c1b05ea202375f8bbc242721fa064ab65453693
Auto-generated-cl: translation import
2013-09-16 09:47:50 -07:00
Baligh Uddin
72e8643fdd Import translations. DO NOT MERGE
Change-Id: Icd16c449ff68a89ecd4a36856764d24f5894c9e5
Auto-generated-cl: translation import
2013-09-16 09:47:04 -07:00
Baligh Uddin
31ceae5629 Import translations. DO NOT MERGE
Change-Id: I68895c16a26ecc9554bfc53e9d9346fe29412fec
Auto-generated-cl: translation import
2013-09-14 20:27:22 -07:00
Baligh Uddin
0bb467e030 Import translations. DO NOT MERGE
Change-Id: Ief842f34cd92fa66273c28e28fd6376b37dfbd5e
Auto-generated-cl: translation import
2013-09-13 21:48:07 -07:00
Baligh Uddin
162e88759c Import translations. DO NOT MERGE
Change-Id: Idfb9ef96c1c4ea6fc1ca836114a8eb09be18f8f4
Auto-generated-cl: translation import
2013-09-13 21:47:27 -07:00
Jeff Sharkey
4c7c51480e am f5513f41: am 0bf2ed90: Merge "Move search to roots; Documents root; hide empty." into klp-dev
* commit 'f5513f41fe041bef29ec70abdce7cc6f582a11c2':
  Move search to roots; Documents root; hide empty.
2013-09-13 17:22:41 -07:00
Jeff Sharkey
f5513f41fe am 0bf2ed90: Merge "Move search to roots; Documents root; hide empty." into klp-dev
* commit '0bf2ed90c42d3a1f1d4be4b70c337f9eaec9cd14':
  Move search to roots; Documents root; hide empty.
2013-09-13 17:13:56 -07:00
Jeff Sharkey
3e1189b359 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
2013-09-13 11:35:04 -07:00
Jeff Sharkey
d4aa10d5be am c3414dc4: am 357f9e34: Merge "Handle pipe thumbnails, acquire unstable refs." into klp-dev
* commit 'c3414dc4baf2bb2c3ef5761912fea7f44d804ebc':
  Handle pipe thumbnails, acquire unstable refs.
2013-09-12 09:22:22 -07:00
Jeff Sharkey
c3414dc4ba am 357f9e34: Merge "Handle pipe thumbnails, acquire unstable refs." into klp-dev
* commit '357f9e34ca4f0336e406044db35834530379db47':
  Handle pipe thumbnails, acquire unstable refs.
2013-09-12 09:17:02 -07:00
Jeff Sharkey
de2b22fbc6 Handle pipe thumbnails, acquire unstable refs.
Support decoding thumbnails delivered over pipes by wrapping in a
buffered stream.  Also switch to using unstable provider references
to avoid crashing DocumentsUI.

Bug: 10516148, 10510851
Change-Id: I85f6eeaca70c97742bf79656d1d0c6da381fdd47
2013-09-11 17:33:52 -07:00
Jeff Sharkey
d7ae147446 am bd56a17d: am af4d039f: Merge "More UX work for thumbnails, search, management." into klp-dev
* commit 'bd56a17df26a3c7f4e32ca3be08fbf28f625dffa':
  More UX work for thumbnails, search, management.
2013-09-10 17:05:07 -07:00
Jeff Sharkey
bd56a17df2 am af4d039f: Merge "More UX work for thumbnails, search, management." into klp-dev
* commit 'af4d039fb3a45d4a74683a69ee48071b8338a13d':
  More UX work for thumbnails, search, management.
2013-09-10 17:02:11 -07:00
Jeff Sharkey
4ec973925f 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
2013-09-10 16:40:36 -07:00
Jeff Sharkey
d04e0c0adb am 78bb372f: am af927234: Merge changes I7b3f4c68,I9f022a08 into klp-dev
* commit '78bb372fb70b7c383ae4ab158734666de9ce8e95':
  Rename offer() to add(), remove/hide some APIs.
  Sort order is sticky for session, back leaves.
2013-09-09 21:45:11 -07:00
Jeff Sharkey
78bb372fb7 am af927234: Merge changes I7b3f4c68,I9f022a08 into klp-dev
* commit 'af9272349fb9eed1653d5af0768c9517e36070a6':
  Rename offer() to add(), remove/hide some APIs.
  Sort order is sticky for session, back leaves.
2013-09-09 21:42:50 -07:00
Jeff Sharkey
b7757a6b32 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
2013-09-09 17:55:10 -07:00
Jeff Sharkey
0b4c23efd9 am 6874b17d: am ff44ed58: Merge "Disabled states, more UX work, bug fixes." into klp-dev
* commit '6874b17d7937a4616a119aea58c8a9c8acef4e7f':
  Disabled states, more UX work, bug fixes.
2013-09-09 17:15:23 -07:00
Jeff Sharkey
6874b17d79 am ff44ed58: Merge "Disabled states, more UX work, bug fixes." into klp-dev
* commit 'ff44ed58a1e38ff830e74b0d73549ff01725852d':
  Disabled states, more UX work, bug fixes.
2013-09-09 17:10:24 -07:00
Jeff Sharkey
3f4c205fd3 Disabled states, more UX work, bug fixes.
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
2013-09-09 16:55:35 -07:00
Jeff Sharkey
c022ee7ace am c91be711: am e6bbcaf0: Merge "Another asset drop, provider icons, tests." into klp-dev
* commit 'c91be7119e817f76f175da46ac26468fcb29b632':
  Another asset drop, provider icons, tests.
2013-09-06 14:03:06 -07:00
Jeff Sharkey
c91be7119e am e6bbcaf0: Merge "Another asset drop, provider icons, tests." into klp-dev
* commit 'e6bbcaf0bc010563c1c65f51ff4610a7bde26609':
  Another asset drop, provider icons, tests.
2013-09-06 14:00:34 -07:00
Jeff Sharkey
6d97d3c1a2 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
2013-09-06 10:46:54 -07:00
Baligh Uddin
367176b567 Merge "Import translations. DO NOT MERGE" 2013-09-04 04:44:04 +00:00
Jeff Sharkey
063a7462a6 am 8dd4bee2: am 5b3f4aa8: Merge "Show loading, error, and info messages as footers." into klp-dev
* commit '8dd4bee2405aa6d1868130c3cc02f68d627987f7':
  Show loading, error, and info messages as footers.
2013-09-03 21:39:17 -07:00