2fbd2a7f070f246ddafd9de94efa9a98861e9136 |
|
17-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
App UI freezes when printing. API clean up. 1. The UI of a printing app was freezing a little when calling the print method since the print manager service was waiting for it to bind to the print spooler which generated the print job id (and the initial print job info really). Now the print manager service is responsible for job id generation and does not not wait for the print spooler to spin. Hence, the app UI is not blocked at all. Note that the print manager initiates the binding to the spooler and as soon as it completes the spooler shows the print UI which is hosted in its process. It is not possible to show the print UI before the system is bound to the spooler since during this binding the system passes a callback to the spooler so the latter can talk to the system. 2. Changed the print job id to be an opaque class allowing us to vary the way we generate print job ids in the future. 3. The queued print job state was hidden but the print job returned by the print method of the print manager is in that state. Now now hidden. 4. We were incorrecly removing print job infos if they are completed or cancelled. Doing that is problematic since the print job returned by the print method allows the app to query for the job info after the job has been say completed. Hence, an app can initiate printing and get a print job whose state is "created" and hold onto it until after the job is completed, now if the app asks for the print job info it will get an info in "created" state even though the job is "completed" since the spooler was not retaining the completed jobs. Now the spooler removes the PDF files for the completed and cancelled print jobs but keeps around the infos (also persisting them to disc) so it can answer questions about them. On first boot or switch to a user we purge the persisted print jobs in completed/cancelled state since they are obsolete - no app can have a handle to them. 5. Removed the print method that takes a file since we have a public PrintDocumentAdapter implementation for printing files. Once can instantiate a PrintFileDocumentAdapter and pass it to the print method. This class also allows overriding of the finish method to know when the data is spooled and deleted the file if desired, etc. 6. Replaced the wrong code to slice a large list of parcelables to use ParceledListSlice class. bug:10748093 Change-Id: I1ebeeb47576e88fce550851cdd3e401fcede6e2b
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
4e4518383f9212618cafa6c9ce2120becc6f6204 |
|
06-Sep-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Printers for a disappearing print serivce incorrectly removed. The code that removes printers for a disappearing print serivice was using printer infos instead printer ids and also wrong map methods. bug:10651739 Change-Id: Idb9ccdaad9a59b3b6d16b079b33afad56bc45255
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
773f54de3de9bce7b6f915aa47ed686b161d77aa |
|
03-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Print API updated. 1. Removed the updatePrinters API on PrinterDiscoverySession. Now re-adding a printer updates it. 2. Added getTrackedPrinters() API to allow a print service to figure out which printers' state should be tracked by the service. 3. Removed the APIs on PrintDocumentInfo that describe the layout of the content as they are not needed. For example, if the print attributes passed in layout require landscape mode, the the app should just create a PDF page with the wider side up and draw its content in portrait. The printer will then rotate the page. Change-Id: Idd72c6e9c129e8b17eef1236573a99773f8ff0a2
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
44720af55a8fdf991929983dad5d53c02851dd1e |
|
21-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print UI bug fixing and printer discovery refactoring. 1. Added support for selecting a printer from the all printers activity that is not in the initial printer selection drop down. The user initially sees a sub set of the printers in the drop down and the last option is to see all printers in a separate activity. Some of the printers in the all printers activity are not shown in the initial drop down. 2. Refactored printer discovery by adding (private for now) printer discovery app facing APIs. These APIs are needed to support multiple printer selection activities (print dialog and all printers activities) and also the settings for showing all printers for a service. Now multiple apps can request observing for printers and there is a centralized mediator that ensures the same printer discovery session is used. The mediator dispatches printer discovery specific requests to print services. It also aggregates discovered printers and delivers them to the interested apps. The mediator minimizes printer discovery session creation and starting and stopping discovery by sharing the same discovery session and discovery window with multiple apps. Lastly, the mediator takes care of print services enabled during discovery by bringing them up to the current discovery state (create discovery session and start discovery if needed). The mediator also reports disappearing of the printers of a service removed during discovery and notifies a newly registered observers for the currnet printers if the observers are added during an active printer discovery session. 3. Fixed bugs in the print UI and implemented some UX tweaks. Change-Id: I4d0b0c5a6c6f1809b2ba5dbc8e9d63ab3d48f1ef
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
798bed6cc7d273e72b0253288605db9cd2b57740 |
|
11-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Refinement of the print service APIs. 1. Factored out the printer discovery APIs of a print service in a dedicated session object that is created by the print service on demand. This ensures that added/removed/updated printers from one session do not interfere with another session. 2. Updated the app facing APIs to pass in a document info along with a printed file. Also exposed the print file adapter so apps that create a temporary file for printing can intercept when it is read by the system so the file can be deleted. 3. Updated the print service documentation. Change-Id: I3473d586c26d8bda1cf7e2bdacb441aa9df982ed
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
55b409a97cf6376399a0940313ea852368727d6f |
|
01-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
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
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|
4b9a4d16872bbb50712e007b419ac0b35ff1582d |
|
12-Jun-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print - platform APIs Related changes: Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/ Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/ Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/ Build: https://googleplex-android-review.googlesource.com/#/c/292437/ Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/ Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
/frameworks/base/core/java/android/print/IPrinterDiscoveryObserver.aidl
|