summaryrefslogtreecommitdiffstats
path: root/core/java/android/printservice/PrinterDiscoverySession.java
Commit message (Collapse)AuthorAgeFilesLines
* Print API updated.Svetoslav2013-09-041-116/+52
| | | | | | | | | | | | | | | | | | 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
* Bug fixes in the printer dialog activity and fused printer loader.Svetoslav Ganov2013-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | 1. Fused printers loader was not using the discovered printers to update the historical ones. Now if a historical printer is discovered we update its state with the discovered, i.e. most recent, information. 2. Fixed a bug in the destination adapter of the print job config dialog that was leading to a crash if all printers item is selected when there are no discovered printers. 3. Updated the add printers asset in the all printers screen. 4. Historical printers were not persisted by the print dialog activity. 5. Reduced the number of printers we send per transation to avoid the binder transaction size limit. Added sending of printers in chunks in a place this was missing. Change-Id: I88b54888360bc0e53b06bd260c2b832d0d6454b6
* Print spooler security and some new print service facing APIs.Svetoslav Ganov2013-08-291-22/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Updated the security mode of the print spooler. Now the spooler is not signed with the system key, it is not a privileged app so if it gets compromised (PDF rendering is a potential attack vector) it cannot access dangerous permissions. Also only the system can bind to the spooler. 2. Added APIs for asking a print service to start and stop tracking a given printer. This is need for the case when the user selects the printer and the print service should do a best effort to keep the system updated for the current state of the printer. 3. Added APIs for putting a print job in a blocked state. A print service would report the print job as blocked if for some reason the printer cannot proceed, e.g. 99 pages are printed but there is no paper for the last one. The user has to add more paper and the print service can resume the job. 4. Changed the read/write APIs to use ParcelFileDescriptor instead of FileDescriptor since the latter does not have a clean API for detaching the wrapped Linux file descriptor when one wants to push it to native. 5. Added API for getting the size of the printed document so the print service can avoid handling big filed over cellular network or ask the user if needed. 6. Now the print services that are preinstalled on the system image are automatically enabled. Change-Id: Ia06c311d3d21cabb9e1368f13928e11cd0030918
* Implemented advanced printer selection and API refactoring.Svetoslav2013-08-191-164/+390
| | | | | | | | | | | | | | | | | | | | 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
* Remove exceptions from the printer discovery session APIs.Svetoslav Ganov2013-08-121-43/+17
| | | | | | | | | It is not possible for a client to check whether the session is not closed and add/update/remove printers atomically. It is always possible that in between the two method calls the session is closed. Therefore, we cannot enforce the exceptions. Change-Id: If0e89e4429c4c360515da8f4bbe0ea3781e8e8fd
* Refinement of the print service APIs.Svetoslav Ganov2013-08-111-0/+357
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