5452 Commits

Author SHA1 Message Date
Jeff Sharkey
db06adec0d Merge "Use Cursors directly when binding documents." into klp-dev 2013-09-03 03:50:00 +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
251097b378 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
2013-09-02 15:33:57 -07:00
Jeff Sharkey
b51331116e 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
2013-09-01 18:59:38 -07:00
Jeff Sharkey
5dfb345df7 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
2013-08-31 21:33:56 -07: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
John Spurlock
bf3a4cb8ae am 982b170e: am 52c10e94: Merge "Status bar icons as expressions of white." into klp-dev
* commit '982b170e199ba3763d6fe210289762c37c46f240':
  Status bar icons as expressions of white.
2013-08-31 08:04:37 -07:00
John Spurlock
982b170e19 am 52c10e94: Merge "Status bar icons as expressions of white." into klp-dev
* commit '52c10e94d98e32d977bfd4021136f4c9fa571bd6':
  Status bar icons as expressions of white.
2013-08-31 08:02:16 -07:00
John Spurlock
bbb97ae7a5 Status bar icons as expressions of white.
Bug:10502089
Change-Id: Id13badd6c729b79492aec5370dbb3dc2479008fd
2013-08-30 21:11:19 -04:00
Jim Miller
c1693cab70 am bd77aa6b: am dd238b56: Merge "Attempt to fix missing clock bug" into klp-dev
* commit 'bd77aa6bfda755a250be36581f95f0da8e7241a7':
  Attempt to fix missing clock bug
2013-08-30 12:59:00 -07:00
Jim Miller
bd77aa6bfd am dd238b56: Merge "Attempt to fix missing clock bug" into klp-dev
* commit 'dd238b5604e14d0da458f9b7589097d365a9dfd1':
  Attempt to fix missing clock bug
2013-08-30 12:56:52 -07:00
Jim Miller
dd238b5604 Merge "Attempt to fix missing clock bug" into klp-dev 2013-08-30 19:55:42 +00:00
John Spurlock
242f98c1fc am 2d68a25b: am b7cdbcef: Add a few SystemUI xxhdpi stragglers.
* commit '2d68a25bd6535668b14bab043f7f7d477d8f2620':
  Add a few SystemUI xxhdpi stragglers.
2013-08-30 08:44:59 -07:00
John Spurlock
2d68a25bd6 am b7cdbcef: Add a few SystemUI xxhdpi stragglers.
* commit 'b7cdbcef9ed9ff45e57b9cb6b4148bc74eb569a0':
  Add a few SystemUI xxhdpi stragglers.
2013-08-30 08:43:01 -07:00
John Spurlock
b7cdbcef9e Add a few SystemUI xxhdpi stragglers.
Bug: 10316062
Change-Id: I1307d7188e8326407c562a1f65f100e6a3dca5ed
2013-08-30 15:39:02 +00:00
John Spurlock
3fe4b4a6ef am 218b8799: am 81e0b1bd: Improve signal assets against tranparent bkgrnd.
* commit '218b87992a2bc1ddf807644811240b272a3b35b4':
  Improve signal assets against tranparent bkgrnd.
2013-08-30 07:16:03 -07:00
John Spurlock
218b87992a am 81e0b1bd: Improve signal assets against tranparent bkgrnd.
* commit '81e0b1bd8325a2897a34f58a1e781e4d653f49fe':
  Improve signal assets against tranparent bkgrnd.
2013-08-30 07:13:27 -07:00
John Spurlock
81e0b1bd83 Improve signal assets against tranparent bkgrnd.
And update ringer icons, restoring their previous optical bounds.

Bug:10546772
Change-Id: If05a1cd674453b496d25dddfe185783abec93f5e
2013-08-30 09:47:42 -04:00
Jim Miller
130016b9c6 am 53be76e1: am 0d72b3e0: Merge "Disable hotword detection on low-memory devices" into klp-dev
* commit '53be76e17205174d3808ba608eece15d2c0d6637':
  Disable hotword detection on low-memory devices
2013-08-29 19:15:46 -07:00
Jim Miller
53be76e172 am 0d72b3e0: Merge "Disable hotword detection on low-memory devices" into klp-dev
* commit '0d72b3e052e6289936286af6506bfd9fa8f7646b':
  Disable hotword detection on low-memory devices
2013-08-29 19:13:41 -07:00
Jim Miller
0d72b3e052 Merge "Disable hotword detection on low-memory devices" into klp-dev 2013-08-30 02:12:27 +00:00
Jim Miller
d54281061c Disable hotword detection on low-memory devices
Change-Id: If21f852af36a8f6dea17f3a87b22f39db3d1d6e8
2013-08-29 18:58:21 -07:00
John Spurlock
28a71a5c7f am f5fbef73: am 8f1f0109: Remove unused status bar help and obsolete resources.
* commit 'f5fbef7357734013346f745bff578b66e0a94fc0':
  Remove unused status bar help and obsolete resources.
2013-08-29 18:13:08 -07:00
John Spurlock
f5fbef7357 am 8f1f0109: Remove unused status bar help and obsolete resources.
* commit '8f1f0109d3c124bfcb09c99e69e6ad51b8208c24':
  Remove unused status bar help and obsolete resources.
2013-08-29 18:10:27 -07:00
John Spurlock
8f1f0109d3 Remove unused status bar help and obsolete resources.
Bug:10502089
Change-Id: I813244c4d5535256a56b242b92e6373edbbaba93
2013-08-29 21:02:15 -04:00
Svetoslav Ganov
4b905b6195 am 97c61ab7: am 86d2db97: Merge "Print spooler security and some new print service facing APIs." into klp-dev
* commit '97c61ab7c02c24c485acf5775310a304730dfeea':
  Print spooler security and some new print service facing APIs.
2013-08-29 16:05:09 -07:00
Svetoslav Ganov
97c61ab7c0 am 86d2db97: Merge "Print spooler security and some new print service facing APIs." into klp-dev
* commit '86d2db9750657401deadea6766c94300c3bfc7cd':
  Print spooler security and some new print service facing APIs.
2013-08-29 16:02:22 -07:00
Svetoslav Ganov
86d2db9750 Merge "Print spooler security and some new print service facing APIs." into klp-dev 2013-08-29 22:59:08 +00:00
Svetoslav Ganov
d26d4898fc Print spooler security and some new print service facing APIs.
1. Updated the security mode of the print spooler. Now the spooler
   is not signed with the system key, it is not a privileged app so if
   it gets compromised (PDF rendering is a potential attack vector)
   it cannot access dangerous permissions. Also only the system
   can bind to the spooler.

2. Added APIs for asking a print service to start and stop tracking
   a given printer. This is need for the case when the user selects
   the printer and the print service should do a best effort to keep
   the system updated for the current state of the printer.

3. Added APIs for putting a print job in a blocked state. A print
   service would report the print job as blocked if for some reason
   the printer cannot proceed, e.g. 99 pages are printed but there
   is no paper for the last one. The user has to add more paper
   and the print service can resume the job.

4. Changed the read/write APIs to use ParcelFileDescriptor instead
   of FileDescriptor since the latter does not have a clean API for
   detaching the wrapped Linux file descriptor when one wants to
   push it to native.

5. Added API for getting the size of the printed document so the
   print service can avoid handling big filed over cellular network
   or ask the user if needed.

6. Now the print services that are preinstalled on the system image
   are automatically enabled.

Change-Id: Ia06c311d3d21cabb9e1368f13928e11cd0030918
2013-08-29 15:39:44 -07:00
John Spurlock
57117d0a8d am 47a41af5: am e87bc32e: Merge "More SystemUI asset updates." into klp-dev
* commit '47a41af51030fc6c504c9a3ee250ddf7a8c5f5ba':
  More SystemUI asset updates.
2013-08-29 11:08:37 -07:00
John Spurlock
47a41af510 am e87bc32e: Merge "More SystemUI asset updates." into klp-dev
* commit 'e87bc32e6d6991b1de72e914f268efc276837e47':
  More SystemUI asset updates.
2013-08-29 11:05:48 -07:00
John Spurlock
fc3c06ef21 More SystemUI asset updates.
White close handles, a few missed xx items.

Bug:10502089
Change-Id: I788f3698249e72c3df3d039c68b438998db1b978
2013-08-29 13:56:31 -04:00
Baligh Uddin
c882eb73e6 Merge "Import translations. DO NOT MERGE" 2013-08-29 14:49:42 +00:00
Baligh Uddin
1b0a22285d Import translations. DO NOT MERGE
Change-Id: I47a12de30bcf92829bbfa2a84e42715bb779ceef
Auto-generated-cl: translation import
2013-08-28 23:27:16 -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
bdeefadd71 Merge "Import translations. DO NOT MERGE" 2013-08-29 03:06:25 +00:00
Baligh Uddin
e450d55f32 Merge "Import translations. DO NOT MERGE" 2013-08-29 03:06:15 +00:00
Baligh Uddin
166853e6c9 Merge "Import translations. DO NOT MERGE" into klp-dev 2013-08-29 03:06:07 +00:00
Baligh Uddin
2825bce193 Merge "Import translations. DO NOT MERGE" 2013-08-29 03:05:41 +00:00
Baligh Uddin
6bf888ddc2 Merge "Import translations. DO NOT MERGE" 2013-08-29 03:05:00 +00:00
Baligh Uddin
cf9ceef72f Merge "Import translations. DO NOT MERGE" 2013-08-29 03:04:36 +00:00
Baligh Uddin
42ca28e97a Merge "Import translations. DO NOT MERGE" 2013-08-29 03:04:21 +00:00
Baligh Uddin
5c77627077 Merge "Import translations. DO NOT MERGE" into klp-dev 2013-08-29 03:04:13 +00:00
Baligh Uddin
911854db33 Merge "Import translations. DO NOT MERGE" 2013-08-29 03:03:48 +00:00