2486 Commits

Author SHA1 Message Date
Jeff Sharkey
b3316ef798 Merge "Storage roots in fragment, sectioned." 2013-08-06 18:42:18 +00:00
Jeff Sharkey
66516697a2 Storage roots in fragment, sectioned.
Move storage roots into a fragment, since it's not a drawer on
tablets.  Cluster and sort roots when displaying.  SectionedListAdapter
to make clustered roots easier to manage.  Add docs for root types.

Move roots cache into separate class to make it easier to share.

Change-Id: Ia0b92eade059e816324641f600c08026c0e268c9
2013-08-06 11:38:46 -07:00
Alan Viverette
882c246003 Fix build, updates current APIs
Change-Id: I34deb72207e6eb7c37dd57d781a66582cef62b95
2013-08-05 12:28:19 -07:00
Alan Viverette
2191a0c857 Merge "Move caption style to its own class, add presets" 2013-08-05 18:32:20 +00:00
Jeff Brown
7d00affce6 Support public virtual displays.
Refactor the new private virtual display API to also support
creating public virtual displays with various characteristics.
This feature requires special permissions and is only intended
for use by the system.

Change-Id: I44dd19f37cf76ea6d6e313afe42f4a412bd96663
2013-08-02 21:11:07 -07:00
Martijn Coenen
badb063c81 Merge "NFC: Host-based card emulation APIs." 2013-08-03 00:49:03 +00:00
Jeff Sharkey
cf9d87c688 Merge "Track and persist directory stacks; recents work." 2013-08-03 00:43:00 +00:00
Jeff Sharkey
dc2963aeca Track and persist directory stacks; recents work.
Move to manual tracking of directory navigation stack so we have Uri
data to persist, instead of opaque fragment backstack.  Remember
directory stacks across launches on a per-app basis.

Start recording recently opened and created files.  Uniform Uri
parameter extraction utility methods in contract.

Change-Id: I79ed30ee10272bf7c53d339e797639c993f649bb
2013-08-02 17:39:38 -07:00
Martijn Coenen
a7397883de NFC: Host-based card emulation APIs.
- New INfcCardEmulation interface to allow apps to interface
  with card emulation system.
- New BIND_NFC_SERVICE permission to prevent malicious apps
  from binding to card emulation services.
- ApduServiceInfo is now in the framework.
- Added constants to Settings.Secure for storing defaults.
- Modified XML grammar a bit.

Change-Id: I56b3fa6b42eb5dc132c91c1386ab1e6bac779059
2013-08-02 17:22:53 -07:00
Alan Viverette
43a1e3d319 Move caption style to its own class, add presets
BUG: 9926077
Change-Id: I14e809c5a95103e57d30f4273399e9914af52b56
2013-08-02 16:45:03 -07:00
Svetoslav Ganov
bb9b300787 Merge " First cut of the print notifications." 2013-08-02 21:24:38 +00:00
Svetoslav Ganov
8c43376ea8 First cut of the print notifications.
1. Added notifications for a queued print job, for a started print job,
       for ongoing canceling a print job, and for a failed print job. The
       notifications for queued and started state have a cancel action. The
       notification for failed print job has a cancel and a restart action.

    2. Propagating failure message from the print service to the notifications.

    3. PrintJobConfigActivity was not setting the initial value for the
       print job copies and was not updating the UI immediately after creation.

    4. Refactored PrintJobConfigActivity to avoid using the hack to avoid
       reaction for item selection change in a spinner for an event that
       happened before the callback was registered.

    5. Removed the label attribute from PrinterInfo and now PrinterId is
       composed of the printer name and the service component name. This
       is nice since for restarting print jobs we do not need to store
       information about the printer except the printer id which is
       already part of the PrintJobInfo's data. Also the printer name
       is not expected to change anyway.

    6. Allowing cancellation of a queued print job. Also no print job is
       cancelled without asking the managing print service to do that.
       Before we were immediately canceling print jobs in queued state
       but it was possible for a buggy print service to not set the
       print job state to started before starting to do expensive work
       that will not be canceled.

    7. PrintServiceInfo was throwing an exception the the meta-data
       XML for the print service was not well-formed which would crash
       the system process. Now we just ignore not well-formed meta-data.

    8. Removed unused permissions from the PrintSpooler's manifest.

Change-Id: Iba2dd14b487f56e137b90d1da17c3033422ab5e6
2013-08-02 14:22:22 -07:00
Jeff Sharkey
aaabfe9587 Merge "Reference docs by ROOT_ID and DOC_ID; recents." 2013-08-02 18:10:09 +00:00
Jeff Sharkey
92d7e697a8 Reference docs by ROOT_ID and DOC_ID; recents.
The same document may be present with different sematics under
multiple storage roots, so always reference using both ROOT_ID and
DOC_ID.  This enables backends to revoke permissions for an entire
root, such as when an account is removed.

Start building provider to remember recently accessed documents.

Change-Id: I75befa2e61393dec12fcc7fd27f631fcddae46fa
2013-08-02 11:05:11 -07:00
Fabrice Di Meglio
3f5a90b2fb Add automatic Drawable mirroring capability when in RTL layout direction
- default value is "no mirroring"
- introduce android:autoMirrored as a new attribute for Drawable,
BitmapDrawable, LayerDrawable, StateListDrawable and NinePatchDrawable
- setting android:autoMirrored="true" means that the drawable will
be mirrored when the layout direction is RTL (right-to-left)
- also fix an issue with ImageView drawable layout direction not
updated correctly when RTL properties were changed

See bug #7034321 Need Drawable RTL support

Change-Id: If595ee5106c786f38e786d3a032e182f784a9d97
2013-08-01 15:15:10 -07:00
David Christie
e1f886f5e3 Merge "Add new app op to monitor high power location requests." 2013-08-01 19:24:53 +00:00
Jeff Sharkey
7e258b31e7 XML metadata for storage backend; custom icons.
Introduce XML metadata for storage backends, used to indicate if
custom roots should be queried, and provide any custom MIME type
icons inside that backend.

Parse metadata and resolve custom icons in UI.

Change-Id: Iec026c0b10845edff7a345d9389691ddf2c87a0e
2013-08-01 11:34:56 -07:00
Amith Yamasani
3d38fa301c Merge "PreferenceActivity Fragment security" 2013-08-01 17:18:03 +00:00
Jean-Michel Trivi
9171db2798 Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Update android.media.AudioManager.requestAudioFocus() javadoc for the
  new focus type.

Bug 8251963

Change-Id: I7cd69faaf5f0169ee462b91d0aaa75dc6b092107
2013-08-01 09:19:58 -07:00
Victoria Lease
f296e317fb Merge "Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)" 2013-08-01 14:40:54 +00:00
Satoshi Kataoka
dc8abf6cee Cleanup InputMethodSubtype and add "isAsciiCapable".
Bug: 8364845
Change-Id: Ic3ace4b6e0432d56696bcbc0be336aec1dc744a5
2013-08-01 17:17:48 +09:00
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