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
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
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
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
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
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
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
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
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
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
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
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
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
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
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