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
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
Move backend root exploration into sliding drawer, and adjust action
bar when moving between modes. Moves sorting into action bar spinner
instead of separate dialog. Also add initial search support.
Change-Id: I70189911ba56ae6bd93d5c503a8600acd6d6c0c5
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
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
Whenever the Recents activity actively hides itself move its task
to the back of the activity stack behind the home task. Otherwise
we get into a loop of the bck key returning to the Recents task
when it is intended to move to the home app.
Fixes bug 9750207.
Change-Id: I7d69f28368db148cb493bf54867df084907910ec
When the system bars are revealed in auto-hiding mode, the user
should be able to dismiss them before the timeout by interacting
with the underlying activity.
Bug:8682187
Change-Id: I79169005baafda27fb5ad9c29ab1ec67600b2eb6
Reverts JB optimization I7ae978caa1f28932ee56f65484b18330a4406b80
made obsolete by I2f9b0591d44599b07bd83f03c4e09e6dd98e1448 in MR1.
Change-Id: I8a738624f9a902648e317f2eac25fd56c3b47a46
The xhdpi was using the hdpi spec instead of the default since
it was the closest match.
This allows both devices to work correctly.
Fixes bug 9985496
Change-Id: I03ddf1b6645d5f82e2fba6c39a1c5b3a37e62d45
1. Added support for reporting the old print attributes during layout.
Now we keep track of the old print attributes, so the app can
compute the delta and decide whether re-layout work is needed.
2. Fixed PrintDocumentAdapter callback interleavings. Layout callbacks
were intermixing with write ones - a mess. Now we make an attempt
to cancel layout and write if they respond to cancellation, otherwise
we wait but do not interleave them.
3. Refactored the PrintJobConfigActivity for easier maintenance and
to have a single update UI method that does the minimal amount
of work.
Change-Id: I31ada1a0550882e6185018e6f17f923aed165d15
new shouldInterrupt logic: screen on, not locked, not dreaming, and
priority above HIGH and noisy, or has fullscreen intent
draft of API allowing devs to give hints about head up display
reuse inflateViews()
add an expand helper to the heads up space
move some things into Entry for reuse
don't allow touches in first second
delay decay if touched
make decay time a resource
add a custom viewgroup for notification rows to get view management
out of the NotificationData class.
Change-Id: I36464f110cfa0dabc3f35db7db6c35c27e8ee2ba
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
This reduces the size of the security area slightly to give
the widget more room.
Fixes bug 9642579
Change-Id: I58b861def932450901b17d6df74958dde8207769
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
Move away from storing the configs in the Intent to prevent issues with
PendingIntents and multiple configs.
The Dialog now queries ConnectivityService for the configuration to
display in the management dialog.
Change-Id: I0e0ef52db840152914d117a24f776d8106e836ff
1. Fixed a case in which the onPrintCompleted callback may not be invoked.
2. Added string resulrces for the different error messages for failed
printing in OnPrintCompletedCallback
3. Fixed the string comments for the MediaSize constants.
4. Added APIs to create certain print attributes by passing in a
string label instead of resource and package name since in some cases
a print service may be getting already internationalized lables
or it may not know all possible values.
5. Fixed a crash in PrintJobConfigActivity if there is no input or
output tray.
Change-Id: Ie877b7dc669051606394aa290e6d2b979a42db4c