5539 Commits

Author SHA1 Message Date
Svetoslav Ganov
53672be110 Merge "Iteration of the print sub-system." 2013-08-01 02:16:20 +00:00
Svetoslav Ganov
55b409a97c Iteration of the print sub-system.
1. Added APIs for adding partially initialized PrintInfo objects
   enabling light-weight lookps for print serivces that want to
   populate the list of available printers without querying each
   of them for its capabilities. This includes APIs for the system
   to request from a print service to update certain printers.

2. Fixed a bug in PrinterId#equals().

3. Added equals and hasCode implementaion to PrinterInfo. Also
   the defaul in PrinterInfo are now an array instead of a
   SparseArray - cheaper.

4. Now PrintJobConfigActivity works with partially specified
   printers. Specifically, if such a printer is selected the
   activity is requesting from the print service to update
   the printer. We are currently not handling the timeout case.
   It also handles udpated pritners.

Change-Id: I5e83e924ef597c9e22cbd06a971d4f4d3bd3a9c1
2013-07-31 18:59:53 -07:00
Svetoslav Ganov
9f1ef00265 Merge "Iteration on the print sub-system." 2013-08-01 00:13:44 +00:00
Victoria Lease
1e546815bb Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)
Quite a few things going on in this commit:

- Enable bitmap strikes by default in Paint objects.

The SkPaint parameter that enables bitmap strikes was not previously
included in DEFAULT_PAINT_FLAGS. This effectively disabled bitmap
fonts. Oops! It's for the best, though, as additional work was needed
in Skia to make bitmap fonts work anyway.

- Complain if TEXTURE_BORDER_SIZE is not 1.

Our glyph cache code does not currently handle any value other than 1
here, including zero. I've added a little C preprocessor check to
prevent future engineers (including especially future-me) from
thinking that they can change this value without updating the related
code.

- Add GL_RGBA support to hwui's FontRenderer and friends

This also happened to involve some refactoring for convenience and
cleanliness.

Bug: 9577689
Change-Id: I0abd1e5a0d6623106247fb6421787e2c2f2ea19c
2013-07-31 15:50:47 -07:00
Ben Murdoch
dabc6fc8a9 Merge "Unhide WebView.evaluateJavascript(..)" 2013-07-31 09:13:27 +00:00
Jeff Sharkey
a1510c9849 Merge "Define storage roots, external GUIDs, creation." 2013-07-31 06:00:35 +00:00
Jeff Sharkey
20d96d8aff Define storage roots, external GUIDs, creation.
Allow storage backends to publish multiple roots into the UI, which
are defined by a directory GUID, type, and label details.  Update
external provider to surface a primary external storage root, and
switch to burning file path into the returned GUIDs so they remain
durable.

Added insert, update, and delete support to external provider. Adds
file extensions to display names when needed to match MIME type.

Add flags for searching and deletion, and extras for Cursor
pagination. Add directory creation dialog to UI. Opening a document
always gives write access.

Change-Id: I9bea1aa0dcde909a5ab86aefeece7451ab920cf1
2013-07-30 22:55:23 -07:00
Romain Guy
6d64d5ab84 Merge "Add missing InsetDrawable.getDrawable() method" 2013-07-31 00:54:25 +00:00
Svetoslav Ganov
85b1f88305 Iteration on the print sub-system.
1.  API changes: Moved copies API from PrintAttributes to PrintJobInfo;
    Changed the PageRange list to an array in PrintDocumentAdapter#onWrite;
    Added onCancelled method to the layout and write callbacks.

2.  Refactored the serialization of remote layout and write commands. Now
    the commands are serialized by the code in the client instead in the spooler.
    The benefit is simple code since the client has to do a serialization to delegate
    to the main thread anyway. The increased IPC found is fine since these calls
    are quite unfrequent.

3.  Removed an unused file: IPrintSpoolerObserver.aidl

4.  Added equals and hasCode implementation to PageRange, PrintAttributes,
    MediaSize, Resolution, Margins, Tray, PrintDocumentInfo.

5.  Added shortcut path for query APIs on PrintJob that return cached values
    if the print job is in a uncuttable state, i.e. completed or cancelled. Failed
    print jobs can be restarted.

6.  PrintJobInfo was not properly serialized.

7.  Updated the look of the print dialog to be stable if there is and there isn't
    currently selected printer.

8.  PrintJobCOnfigActivity now calls onLayout on every print attributes change
    but requests a write only on print preview or print button press. Also if the
    layout did not change the content and it is already written no subsequent
    call is made. Also if the selected pages change and we already have them
    no subsequent call to write is made. Also the app is called with print preview
    attribute set when performing layout and with it cleared after the print button
    is pressed. A lot of changes making sure that only valid actions are enabled
    in the activity (looks like a dialog) at a given time frame. The print job config
    activity is also hidden after we got all the data, i.e. layout and write are done.

9.  The callback from the print spooler to the system are scheduled via messages
    to avoid lock being held during the call. It was hard to guarantee that since a
    method holding a lock may be calling one that would like to release the lock
    at some point to make the callbacks.

10. Print spooler state is persisted only if something changes in a completed
    print job, i.e. not one that is being constructed due the print job config dialog.

11. Fixed a potential race in the RemotePrintSpooler where it was possible that
    a client that got a handle to the remote spooler calls into an unbound spooler.
    E.g: the client gets the remote interface with a lock held, now the client releases
    the lock to avoid IPC with a lock, during the IPC scheduling the spooler has
    notified the system that it is done and the system unbinds from it, now the
    client's IPC is made to a spooler that is disconnected.

Change-Id: Ie9c42255940a27ecaed21a4d326a663a4788ac9d
2013-07-30 17:15:11 -07:00
Amith Yamasani
364ed4dda4 PreferenceActivity Fragment security
Provides a way for PreferenceActivities to verify that they
aren't being launched with Fragments not meant to be attached to
them. Default implementation will fail verification for apps built
with KLP. This will not affect apps built for earlier targets.

Also, make sure that the class being instantiated is a Fragment and
not some random class.

Bug: 9901133

Change-Id: I564cd5168eabcadd7594ea8011e2081ebebfe063
2013-07-30 16:23:50 -07:00
David Christie
0b83745019 Add new app op to monitor high power location requests.
This is a new op parallel to the existing OP_MONITOR_LOCATION
but only tracks those requests deemed to be above a
power threshold.

Change-Id: I76fe4d9d2e550293b9da6d5cf902a5b4dd499f0f
2013-07-30 14:59:33 -07:00
Romain Guy
84956d53f1 Add missing InsetDrawable.getDrawable() method
Change-Id: I216b0e8a327f495fd83ebac79013418dbae007b9
2013-07-30 13:01:40 -07:00
Wink Saville
f2c89b9ed6 am 9516ed45: am cfc23ac6: Merge "Add support for MNC=00"
* commit '9516ed4598948eea5623c57e443bce08c1f48ab6':
  Add support for MNC=00
2013-07-30 12:28:05 -07:00
Eino-Ville Talvala
2f1a2e423e Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
2013-07-30 11:37:31 -07:00
Romain Guy
56fbb6362b Merge "Add path ops API" 2013-07-30 17:53:05 +00:00
Romain Guy
8018c8db82 Add path ops API
Path ops can be used to combine two paths instances in a single path
object. The following operations can be used:

- Difference
- Reverse difference
- Union
- XOR
- Intersection

To use the API:

Path p1 = createCircle();
Path p2 = createRect();

Path result = new Path();
result.op(p1, p2, Path.Op.DIFFERENCE);

This code will subtract the rectangle from the circle and generate
the resulting path in "result."

Change-Id: Ic25244665b6691a7df0b0002a09da73d937b553b
2013-07-30 10:51:24 -07:00
Ben Murdoch
1c8c179dbf Unhide WebView.evaluateJavascript(..)
CTS test is now added, so we are now ready to unhide.

Bug: 9814043
Change-Id: I9970b7010300b1b0644498f0359ca3840410dcea
2013-07-30 11:35:14 +01:00
Jason Sams
d979208974 Relax restriction on Colormatrix and add Add step.
Change-Id: Iccb519bb40f58f02346b5c0a10c1378cb853e3f8
2013-07-29 22:09:08 +00:00
Mathias Agopian
e591b49de0 single buffer mode for SurfaceTexture
Bug: 9891035
Change-Id: Ib9cc2b64f7ff3c084ef1d7db442db8e7a24a923d
2013-07-26 19:33:54 -07:00
Mathias Agopian
9f213c8b64 Merge changes I487d4eef,Ia750811f
* changes:
  get rid of PixelFormatInfo and simplify things
  get rid of PIXEL_FORMAT_A_8
2013-07-26 20:56:23 +00:00
Mattias Petersson
1d766b5321 Add support for MNC=00
This adds support for operators with MNC (Mobile Network Code) zero
to add customized resources. For example, it makes it possible to
add a folder called "/res/values-mnc00/" in an application. This will
cause resources in that folder to be used when MNC is zero.
(There is a total of 14 countries that have an operator with MNC
zero.)

Without this fix, the resource framework gets confused, because MNC 0
is normally used when the MNC is undefined (not set).

Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
2013-07-26 18:42:34 +00:00
Martijn Coenen
437d770118 Merge "Change XML-grammar for (Off)HostApduServices." 2013-07-26 16:52:55 +00:00
Mathias Agopian
2ca204e4c0 get rid of PixelFormatInfo and simplify things
Change-Id: I487d4eef7db0095ace4babf5bb100a8769711257
2013-07-25 19:25:10 -07:00
Martijn Coenen
c3178e5f1c Change XML-grammar for (Off)HostApduServices.
AIDs can now carry a category attribute. Clarified that
"OffHostApduService" is not bound to by Android, and may
be extended by offering service interfaces that are not
defined in the platform.

Change-Id: Idd0a3990beb927e8d81366013f53386fb46e3f9f
2013-07-25 17:43:47 -07:00
Matthew Williams
f7e843e3a2 Merge "AnonymousSyncService & SyncRequest." 2013-07-24 22:41:22 +00:00
Matthew Williams
fa77418134 AnonymousSyncService & SyncRequest.
Changes to the way bundles are parcelled broke SM,
this update writes out the bundle as xml. This circumvents
the need for parcel, and makes it easier to debug whats
happening.
Change-Id: I6cd5d3a2eb80bfa5b3ae0c7f2d2ff91a65daaa34
2013-07-24 15:25:29 -07:00
Alan Viverette
87c79a18fe Merge "Add secure settings for captions" 2013-07-24 18:16:16 +00:00
Amith Yamasani
dc56ceb6a1 Merge "New permission to manage device admins" 2013-07-24 00:06:34 +00:00
Martijn Coenen
7ea1ab60b0 Merge "Re-use "name" attribute for NFC AIDs." 2013-07-23 22:27:05 +00:00
Alan Viverette
ef79380d2f Add secure settings for captions
BUG: 9926077
Change-Id: I202aef88943e1f884e5bd4c112f081b8b4b76ada
2013-07-23 14:15:28 -07:00
Michael Wright
b1f5585f89 Merge "Add controller numbers for gamepads / joysticks" 2013-07-23 20:52:57 +00:00
Michael Wright
ac6c78b6ee Add controller numbers for gamepads / joysticks
Change-Id: I30ac9add6a2473a5ebd83a022c571545e61d1136
2013-07-23 13:50:10 -07:00
Dianne Hackborn
57a7f5954c Add "adb shell am restart" command.
So you can restart the system without being root.

Change-Id: I89770f497833ecbe2b69e3a0cfafae7ef472a9f5
2013-07-23 11:51:22 -07:00
Amith Yamasani
9dade39ec3 Merge "User restriction API to disable single-user restrictions feature." 2013-07-23 16:21:48 +00:00
Amith Yamasani
0343ec3abb User restriction API to disable single-user restrictions feature.
Change-Id: I80e08b38b5e32f3cb1af51398907510508ec199f
2013-07-23 09:17:21 -07:00
Martijn Coenen
434249ef62 Re-use "name" attribute for NFC AIDs.
Change-Id: I92895e0f21a639897c45ec184580c43ba8b22dca
2013-07-22 19:47:57 -07:00
Martijn Coenen
fd23eca5ba Merge "First shot at (host-based) card emulation APIs." 2013-07-22 23:20:01 +00:00
Martijn Coenen
ce1279686b Merge "Add host-based card emu feature to PackageManager." 2013-07-22 22:29:21 +00:00
Svetoslav Ganov
26bd5f1d3a Merge "Implement persistence/restoring of print spooler state." 2013-07-22 20:08:16 +00:00
Svetoslav Ganov
88d199130d Implement persistence/restoring of print spooler state.
1. Implemented the persistence and restoring of the print spooler state.
   The print spooler state is saved as an XML on every print job change
   and is restored when we bind to the spooler. The system does not
   unbind from the spooler until the state persistence completes. We
   are now storing the entire state, i.e. all print jobs, when a single
   one changes. This is not optimal but we are not expecting to have
   many such at the same time, so for now we err for simplicity of
   implementation.

2. Enforcing a non-empty print job name.

3. Hidden the STATE_CREATED print job state which should never be visible to a
   client since this is the state of a print job during construction, i.e. the
   print dialog is up and we are doing back and forth with the app.

4. Fixed some PrintAttributes APIs that were incorrectly taking in a PackageManager
   instance.

5. Updated the PrintSpooler build file due to splitting the framework into multiple
   jars.

Change-Id: I52c88eaa1ec9c64920359cc143c79832a4c3d25b
2013-07-22 13:07:09 -07:00
Martijn Coenen
f4bf158328 Add host-based card emu feature to PackageManager.
Change-Id: Id55025e5ab8443be1e6ac23ac5d9ab93565a53f0
2013-07-22 12:10:18 -07:00
Amith Yamasani
a418cf21c9 New permission to manage device admins
The previously used permission was doing double duty as the permission
that device admins to check for to ensure that calls are coming from valid
system components.

MANAGE_DEVICE_ADMINS is system|signature and is now required to add/remove
device admins.

Required for:
Bug: 9856348

Change-Id: I64385d2ec734c3957af21b5a5d9cffd8a3bcd299
2013-07-22 10:42:46 -07:00
Martijn Coenen
5eaa8970aa First shot at (host-based) card emulation APIs.
HostApduService: convenience service class for implementing
a service that registers a set of ISO7816-4 AIDs and emulates
the corresponding application inside the service itself.

SeApduService: convenience service class for implementing
a service that registers a set of ISO7816-4 AIDs that reflect
applications installed on an embedded secure element or UICC. Contains
event hooks to allow the service to handle eSE/UICC events that
correspond to those AIDs.

Change-Id: I44191bd4abcbbe4f1fd36a9fd42639fe5c0cf496
2013-07-22 10:20:49 -07:00
Christopher Tate
57ceaaa0aa Add AlarmManager.setWindow(...) for supplying an explicit delivery window
Bug 9532215

Change-Id: I0efe32cbaaae8ce6ab223041eed116c3470a7326
2013-07-19 18:11:45 -07:00
Mike Lockwood
757ec7837d Merge "LocalSocket: Add support for SOCK_DGRAM and SOCK_SEQPACKET" 2013-07-19 17:39:28 +00:00
Christopher Tate
1a80cfe968 Merge "Batch alarms to reduce device wakeups" 2013-07-19 00:22:59 +00:00
Chris Craik
ef5498edf6 Merge "Add reconfigure method to Bitmap" 2013-07-18 22:55:44 +00:00
Justin Koh
cacfe69b68 Add FX_KEYPRESS_INVALID constant to AudioManager.
Add FX_KEYPRESS_INVALID constant to AudioManager. This is a sound which should
play if the user tries to click or press on an element which is disabled.

Change-Id: Idd8953abeddd1afb51f7f190f9fb612ef672defa
2013-07-18 10:46:19 -07:00
Svetoslav
dc990e7c61 Merge "Tweak the print APIs." 2013-07-17 22:05:21 +00:00
Svetoslav
6283608e0b Tweak the print APIs.
1. Adding bundle with metadata to PrintDocumentAdapter#onLayout
   with one key for now to specify whether this is for a preview.

2. Cleaned up docs.

Change-Id: I89380781bf3ae41aa89f8a0347d74516a210394c
2013-07-17 14:55:15 -07:00