d74d1e549168ba521e8009961b76e8718be37aa1 |
|
18-Mar-2016 |
Philip P. Moltmann <moltmann@google.com> |
Change hasCustomPrintIcon and setStatus as requested by API council. Bonus: null advanced keys produced a exception deep in the print spooler. Hence prevent null keys on the surface from now on. Bug: 27716355 Change-Id: I3c064956f4e670cd7091437ade06605aa8d797b0
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
8141bdfa56f13c3946bed12ba7801e492ec25c11 |
|
22-Dec-2015 |
Philip P. Moltmann <moltmann@google.com> |
Store which print services are disabled instead of which are enabled This make services that appreared while the print manager was not active by default enabled. In the case we upgrade from pre-N we convert the enabled-list into a disabled-list. Bug: 26249649 Change-Id: Iae783a8dd19f1a9d75d675710ea4348fdfbd34f3
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
bb9f686b40743df2642b7d3b7778dbf7284ae665 |
|
01-Dec-2015 |
Philip P. Moltmann <moltmann@google.com> |
Allow a print service to specify per printer icons, description and info-activities The icon is loaded from the discovery session only when it is displayed to avoid having to store too many icons in memory. Also the icons are not maintained in the historical printers. Only if the printers are available nice icons are shown. A historical printer is updated with the appropriate properties (including icon) once it becomes available. Bug: 24135005 Change-Id: Iec389bab514b024634be8fb5fc8928371cba8740
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
b3078c235e7674fd61be75fb469105ba6174aba5 |
|
24-Nov-2015 |
Philip P. Moltmann <moltmann@google.com> |
Allow print service to specify progress of print and status The status has always been there in error cases, it is now also visible in non-error cases. If the progress is not set, no progress bar is shown. Bug: 24135025 Change-Id: Iea23f45d236365433c6f6739597833d236ed6d19
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
853a6f564abaf8acbd88c6704008c5d150d00471 |
|
03-Nov-2015 |
Philip P. Moltmann <moltmann@google.com> |
Add a alert that allows the user to approve a print service when we print using it the first time. This warning used to be shown when the print settings app was used to enable a service. If two warning as shown for the same print service we automcatially dismiss all dialogs once one dialog is confirmed. Please note that we are not confirming the printjob as it is unexpeced to have a single click to confirm multiple print jobs. Change-Id: I8bb0a49bac2063c1c55e2f24bd34df2c44e2df89 Bug: 24135353
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
7bfbbcb04bf4ba8f3069b2df136f708c9849bacf |
|
10-Oct-2013 |
Svetoslav <svetoslavganov@google.com> |
Refactor how the print dialog activity is started. 1. Before the print job activity was started asyncronously with respect to the print call on to the print manager. This was creating a situation where the starting activity may finish before the print dialog appears which may lead to an orphaned print document adapter with no data to print (as the UI is is gone), or strange behaviors where the print dialog starts on as a separate task. To address this the pending intent for starting the print dialog is not started by the print spooler since we cannot call into it synchronously as we have to start its process and bind to the spooler service which leads to jankyness in the client app. Now the pending intent is created by the print manager service in the synchronous print call so from an app's perspective calling print starts the activity. The side effect of this design is that the print dialog activity may start before the system is bound to the spooler service. In such a case the print activity cannot start poking the print spooler state as the system registers callback to observe the spooler state. To address this the print spooler activity disables the UI and also binds to the spooler service which happenes immediately after it is started. As soon as the print dialog binds to the service it starts the UI. 2. Fixed an bug in the printer adapter of the print dialog that was leading to a crash if the only item in the adater is the all pritners option and it is selected. 3. Piping the package name that started the printing so we can pass it to the storage UI as a hint to open the last location the app used. bug:11127269 Change-Id: Ia93820bdae0b0e7600a0930b1f10d9708bd86b68
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
a18661d5922e5ae24ccce8e815aeba437a2fba82 |
|
10-Oct-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Coalescing multiple print job notifications. 1. We used to show a single notificaiton for every print job but this is against th UX guidelines. Since we have to lead by example, this change adds coalescing of multiple notifications. bug:11155212 2. Print job state callback in the PrintManager now correctly invoked on the main thread. bug:10983508 Change-Id: I906e9e62198fa37cb4d2f71fce07ed475d61e1bd
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
dd68da2741fa63070d5ad206020dcccb9f429a5a |
|
27-Sep-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print job files and print job records not always cleaned up. 1. We want the files for a print job to be removed as early as possible typically because the print job was cancelled, completed, the app or the spooler crashed during print job construction. We were keeping around in the spooler and hence to disc infos for jobs that are in final state since the app that created them may hold a reference to a local print job objec whose info it can access to get the latest print job state potentially after the job reached final state. The issue was that we were persisting to disc created print jobs which were during construction which requires careful handling for the various cases above. This is tricky and error prone. We used to tell the spooler to forget the print jobs infos when the app that created them died. The implementation to forget a print job was not careful and was nuking currently running print jobs in addition to the ones in a terminal state. Further, if the app dies before a print job is completed we were left with a stale print job in the spooler since we missed the signal to forget it (assuming we forget only inactive jobs). These issues suggest that the approach is problematic. Now we have a cache of print job infos for the jobs an app created. This cache is updated when the state of a print jobs changes using the new print job state observation code. When the app dies we remove the cached jobs for that app. Now if the app calls to get the print jobs it gets the cached ones, i.e. the print jobs it created during its lifetime, plus the print jobs that are still active fetched from the spooler. Note that transient state cannot be kept in the spooler since we unbind from it if there is no work and it may get killed. 2. Improved the print sub-system logging code to show the cached print job infos for apps and also dump the print job PDF file names. bug:10958357 Change-Id: I6f7c1968b6b7ba5be182a10df044ff7ea1fc3a61
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
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/IPrintSpooler.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/IPrintSpooler.aidl
|
269403b032f965ff3847eb982c2f697229dc5a92 |
|
15-Aug-2013 |
Svetoslav <svetoslavganov@google.com> |
Implemented advanced printer selection and API refactoring. 1. Added past printer history tracking and merging favorite printers with discovered printers. 2. Added save as PDF support. 3. Added all printers activity with search capability and optional add printers chooser (if any print service provides add printers activity) 4. Refactored the printer discovery session APIs. Now one session can have multiple window discovery windows and the session stores the printers found during past discovery periods. 5. Merged the print spooler and the print spooler service - much simpler and easier to maintain. Change-Id: I4830b0eb6367e1c748b768a5ea9ea11baf36cfad
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
835835ee6f913408ac91678d6056896a2c5b25e3 |
|
05-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Polish the print spooler loading of stored print jobs. 1. The singleton print spooler isntance is created when the print spooler service gets a connection to the system and is destroyed when this connection is removed. Note that if the spooler has work, then the connection to the system will not be removed. When the spooler is created, it reads the stored state and notifies the system which in turn dispatches this to the print services. When the system connects to the spooler and passes it a connection, we schedule a delayed check whether there is work for the spooler. We do not handle this immediately to avoid intermitted spinning on and off of the spooler process if a client makes a sequence of queries while the spooler has really no work. 2. Fixed a bug in the NotificationManagerService where adding a notification and removing it immediately after that does not remove the notification. The code that is adding a notification is run on a handler thread while the code to remove it on the calling thread. This creates a race and erroneous results. Now the removal is also scheduled on the handler. 3. Many small fixes here and there. Change-Id: I6415c253139fa6616393fbe23c659d031a29e1f6
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
8c43376ea83a67414bd6823a472b76d41160239e |
|
02-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
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
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|
a00271533f639c8ed36429c663889ac9f654bc72 |
|
25-Jun-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Refactoring of the print sub-system and API clean up. 1. Now a user state has ins own spooler since the spooler app is running per user. The user state registers an observer for the state of the spooler to get information needed to orchestrate unbinding from print serivces that have no work and eventually unbinding from the spooler when all no service has any work. 2. Abstracted a remote print service from the perspective of the system in a class that is transparently managing binding and unbinding to the remote instance. 3. Abstracted the remote print spooler to transparently manage binding and unbinding to the remote instance when there is work and when there is no work, respectively. 4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to enable implementing the all callbacks on a thread of choice. If the document is really small, using the main thread makes sense. Now if an app that does not need the UI state to layout the printed content, it can schedule all the work for allocating resources, laying out, writing, and releasing resources on a dedicated thread. 5. Added info class for the printed document that is now propagated the the print services. A print service gets an instance of a new document class that encapsulates the document info and a method to access the document's data. 6. Added APIs for describing the type of a document to the new document info class. This allows a print service to do smarts based on the doc type. For now we have only photo and document types. 7. Renamed the systemReady method for system services that implement it with different semantics to systemRunning. Such methods assume the the service can run third-party code which is not the same as systemReady. 8. Cleaned up the print job configuration activity. 9. Sigh... code clean up here and there. Factoring out classes to improve readability. Change-Id: I637ba28412793166cbf519273fdf022241159a92
/frameworks/base/core/java/android/print/IPrintSpooler.aidl
|