62 Commits

Author SHA1 Message Date
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
Jeff Sharkey
8dd4bee240 am 5b3f4aa8: Merge "Show loading, error, and info messages as footers." into klp-dev
* commit '5b3f4aa84fe3f97075f4ed0763c9ee8a3dd2065d':
  Show loading, error, and info messages as footers.
2013-09-03 21:36:12 -07:00
Jeff Sharkey
954be02326 Show loading, error, and info messages as footers.
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
2013-09-03 17:02:47 -07:00
Baligh Uddin
0c02096862 Import translations. DO NOT MERGE
Change-Id: If6461fff76109212bf1e28bf238c6876cb2fa0be
Auto-generated-cl: translation import
2013-09-03 10:10:16 -07:00
Jeff Sharkey
7e6d74494a am f56ae2b9: am 118cb035: Merge "Filter roots based on incoming request." into klp-dev
* commit 'f56ae2b903a24a891cf349025c97c05134e88e59':
  Filter roots based on incoming request.
2013-09-02 20:58:57 -07:00
Jeff Sharkey
f56ae2b903 am 118cb035: Merge "Filter roots based on incoming request." into klp-dev
* commit '118cb0353f6dabce1a1d6b550f7fc9eb78c7de87':
  Filter roots based on incoming request.
2013-09-02 20:55:12 -07:00
Jeff Sharkey
118cb0353f Merge "Filter roots based on incoming request." into klp-dev 2013-09-03 03:50:56 +00:00
Jeff Sharkey
348ad6866b 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
2013-09-02 17:43:14 -07:00
Jeff Sharkey
a2a772035f am 8c58b792: am cd6d7dee: Merge "Refactoring of DocumentsContract." into klp-dev
* commit '8c58b79243748eeb98b650c8e660a742ad876452':
  Refactoring of DocumentsContract.
2013-09-02 17:14:37 -07:00
Jeff Sharkey
8c58b79243 am cd6d7dee: Merge "Refactoring of DocumentsContract." into klp-dev
* commit 'cd6d7deec8742e257a670db8e027f628afdf337e':
  Refactoring of DocumentsContract.
2013-09-02 17:09:15 -07:00
Jeff Sharkey
cd6d7deec8 Merge "Refactoring of DocumentsContract." into klp-dev 2013-09-03 00:07:17 +00:00
Jeff Sharkey
ae9b51bfa3 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
2013-08-31 16:58:28 -07:00
Jeff Sharkey
98486543cc am 6607275b: am 9fd81a90: Merge "Stronger DocumentsProvider contract." into klp-dev
* commit '6607275b3a99b28f4176f8f8cc87f46c5ed051db':
  Stronger DocumentsProvider contract.
2013-08-28 21:35:17 -07:00
Jeff Sharkey
6607275b3a am 9fd81a90: Merge "Stronger DocumentsProvider contract." into klp-dev
* commit '9fd81a9008d5c8dd33272b6a451d89fa2fa1841e':
  Stronger DocumentsProvider contract.
2013-08-28 21:32:08 -07:00
Jeff Sharkey
9fd81a9008 Merge "Stronger DocumentsProvider contract." into klp-dev 2013-08-29 04:27:02 +00:00
Jeff Sharkey
aeb16e2435 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
2013-08-28 20:49:42 -07:00
Baligh Uddin
1aa207398e Import translations. DO NOT MERGE
Change-Id: I6c791fa210df4aea49e2b0ffaaf852ae6fc90cb1
Auto-generated-cl: translation import
2013-08-28 18:09:00 -07:00
Baligh Uddin
b49ebe203e Merge "Import translations. DO NOT MERGE" 2013-08-28 00:43:05 +00:00
Jeff Sharkey
308aacb924 am 365768fd: Merge "Return EXIF thumbnails when available." into klp-dev
* commit '365768fd3533343d6631875d7d46882907f7ab09':
  Return EXIF thumbnails when available.
2013-08-26 15:02:57 -07:00
Baligh Uddin
78ff92cc32 Import translations. DO NOT MERGE
Change-Id: I96d7c9b76b7196a7432d3b9bfa48267fb4c27cc7
Auto-generated-cl: translation import
2013-08-26 09:46:02 -07:00
Baligh Uddin
dc6c5a9950 Import translations. DO NOT MERGE
Change-Id: I90a32d22c5c97408ef96635be46c069c22fddca7
Auto-generated-cl: translation import
2013-08-26 09:45:01 -07:00