summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler
Commit message (Collapse)AuthorAgeFilesLines
* Import translations. DO NOT MERGEBaligh Uddin2014-04-2255-0/+4345
| | | | | Change-Id: Iae11d6890917425aa6c6269d46372f4e6d6c08a2 Auto-generated-cl: translation import
* am fc1d0471: am 11b7d9fa: Merge "PrintSpooler crash if printer is reported ↵Svetoslav2014-03-141-6/+10
|\ | | | | | | | | | | | | to have only one color mode." into klp-dev * commit 'fc1d04714e9042a1b01c7a725fafa1820b8c14fb': PrintSpooler crash if printer is reported to have only one color mode.
| * am 11b7d9fa: Merge "PrintSpooler crash if printer is reported to have only ↵Svetoslav2014-03-131-6/+10
| |\ | | | | | | | | | | | | | | | | | | one color mode." into klp-dev * commit '11b7d9fa6685e742f5b3e3235a8e6e4920dbed02': PrintSpooler crash if printer is reported to have only one color mode.
| | * PrintSpooler crash if printer is reported to have only one color mode.Svetoslav2014-03-121-6/+10
| | | | | | | | | | | | | | | | | | | | | bug:11993304 Change-Id: I4932cf1b5b9b89f0cbf97011782ede037e7d814c (cherry picked from commit b0d97b87ba5f23ee867f381a4e5916ebb2e5f762)
| | * Import translations. DO NOT MERGEBaligh Uddin2014-02-191-2/+2
| | | | | | | | | | | | | | | Change-Id: I3300523019b91cffd6f36d02434c521ab7368f37 Auto-generated-cl: translation import
* | | am d220d820: am c04aa87e: Merge "Fix incorrent page range parsing when ↵Dave Langemak2013-11-191-3/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | custom print options used." into klp-dev * commit 'd220d8202e67a82075ee20351657509ca0885b67': Fix incorrent page range parsing when custom print options used.
| * | am c04aa87e: Merge "Fix incorrent page range parsing when custom print ↵Dave Langemak2013-11-191-3/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | options used." into klp-dev * commit 'c04aa87e4ac41b6c65dceb7b20d7a7f92c2efec1': Fix incorrent page range parsing when custom print options used.
| | * Merge "Fix incorrent page range parsing when custom print options used." ↵Dave Langemak2013-11-191-3/+7
| | |\ | | | | | | | | | | | | into klp-dev
| | | * Fix incorrent page range parsing when custom print options used.Svetoslav Ganov2013-11-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have APIs for a print service to declare an activity with custom print options. In this activity the service can add custom properties as well as change the standard ones such as pages to print. The ranges of selected pages from the custom activity was incorrectly parsed resulting in an off by one error in what is shown to the user and as a result getting an exception when trying to print. bug:11719051 Change-Id: Id04c94608178895f1d47381a63133f0eba7645e1
| | * | Import translations. DO NOT MERGEBaligh Uddin2013-11-171-7/+7
| | | | | | | | | | | | | | | | | | | | Change-Id: I6eea0f5a4b57c4686d1f6ff4fc137358400651b8 Auto-generated-cl: translation import
| | * | Import translations. DO NOT MERGEBaligh Uddin2013-11-141-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I6d1283da139ad2ef60213d83d7ac00939a4bfc04 Auto-generated-cl: translation import
* | | | am d2b27cbd: am 6874bfe1: Merge "Created print jobs should not be persisted ↵Svetoslav2013-11-142-2/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | until they are queued." into klp-dev * commit 'd2b27cbde92dc57b5b6fe9b7434a5189a73dd2b2': Created print jobs should not be persisted until they are queued.
| * | | am 6874bfe1: Merge "Created print jobs should not be persisted until they ↵Svetoslav2013-11-142-2/+9
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | are queued." into klp-dev * commit '6874bfe19b6bc1522e07e53eb96a07e21d148b41': Created print jobs should not be persisted until they are queued.
| | * | Created print jobs should not be persisted until they are queued.Svetoslav2013-11-142-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print jobs in a created state should not be persisted. However, if a print service sets the tag to a print job that is queued, we were persisting even print jobs in a created state. This change adds a simple check while persisting to avoid storing created print jobs. bug:11696785 Change-Id: Idf28f3634b91fd5bf345f376114af4ed478ed3c6
* | | | am 852a8895: am d697ba73: Merge "Fix NPE at PrintSpooler in Japanese ↵Svetoslav Ganov2013-11-131-7/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | environment." into klp-dev * commit '852a8895e18ad578a4c299d13615a4cbb3ee1211': Fix NPE at PrintSpooler in Japanese environment.
| * | | am d697ba73: Merge "Fix NPE at PrintSpooler in Japanese environment." into ↵Svetoslav Ganov2013-11-131-7/+7
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | klp-dev * commit 'd697ba73b5a5fc5dc502a117a8f06e8f1a5359b9': Fix NPE at PrintSpooler in Japanese environment.
| | * | Fix NPE at PrintSpooler in Japanese environment.Keiji Ariyama2013-11-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MediaSize ID have to be upper cases. Change-Id: I84af01dbd185df210b5ebb1de282a4091e06df05 Related-issue: https://code.google.com/p/android/issues/detail?id=61984
| | * | Import translations. DO NOT MERGEBaligh Uddin2013-11-1136-141/+71
| | | | | | | | | | | | | | | | | | | | Change-Id: I75eb5e47f9851174f7bd7e8301537bf7c94a8b5a Auto-generated-cl: translation import
| | * | Import translations. DO NOT MERGEBaligh Uddin2013-11-0655-0/+180
| | |/ | | | | | | | | | | | | Change-Id: I13dd4dfd6492c31975cd61e28caeea940a5f66cb Auto-generated-cl: translation import
* | | am 3976afb5: am c445b3f2: Merge "Add missing null pointer check in ↵Svetoslav2013-11-051-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | PrintSpoolerService." into klp-dev * commit '3976afb5ac2036864f8d75c26e144c5761c6b20c': Add missing null pointer check in PrintSpoolerService.
| * | am c445b3f2: Merge "Add missing null pointer check in PrintSpoolerService." ↵Svetoslav2013-11-041-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit 'c445b3f2cba67b7dbb8f926ef5e80ec14fb2f8d4': Add missing null pointer check in PrintSpoolerService.
| | * Merge "Add missing null pointer check in PrintSpoolerService." into klp-devSvetoslav2013-11-051-1/+1
| | |\
| | | * Add missing null pointer check in PrintSpoolerService.Svetoslav2013-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | bug:11474389 Change-Id: I80ea01ba04ab71a212c1f78af62b377110ed072a
* | | | am 628264c4: am 4033c94b: Merge "Add way for the user to forget previously ↵Svetoslav2013-11-054-17/+170
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | used printers." into klp-dev * commit '628264c4f3828e0c4c997bb91f289a91d54c75c4': Add way for the user to forget previously used printers.
| * | | am 4033c94b: Merge "Add way for the user to forget previously used ↵Svetoslav2013-11-044-17/+170
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | printers." into klp-dev * commit '4033c94bb7566a652442ae1fa164d1efa7562761': Add way for the user to forget previously used printers.
| | * | Add way for the user to forget previously used printers.Svetoslav2013-11-044-17/+170
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep track of historical printers but some of them may disappear forever, say the user changes his printer. In such a case the print system has no idea that the previous printer will never appear so this change allows the user to remove historical printers. In the all printers list the user can now long press on a printer and if the printer is available he can select it from the context menu. If the printer was used before regardless if it is active the user may choose to forget it. bug:11282742 Change-Id: Idc2dda70920ad045149eea1bcfc75ad1992827e9
| | * Merge "Import translations. DO NOT MERGE" into klp-devBaligh Uddin2013-11-0155-6/+61
| | |\
| | | * Import translations. DO NOT MERGEBaligh Uddin2013-10-3055-6/+61
| | | | | | | | | | | | | | | | | | | | Change-Id: I6275ae5da91b961e11974efd80e6b4947bd44972 Auto-generated-cl: translation import
* | | | am eccfe65f: am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper ↵Svetoslav2013-10-312-0/+14
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | if printing is cancelled." into klp-dev * commit 'eccfe65f9daf459342ebc658b8a40584dfcea016': Cancel current work in PrintDocumentAdatper if printing is cancelled.
| * | | am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper if printing ↵Svetoslav2013-10-312-0/+14
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | is cancelled." into klp-dev * commit '6ce161d1762a1c74b1ed6931c1d54f1f553267b0': Cancel current work in PrintDocumentAdatper if printing is cancelled.
| | * | Cancel current work in PrintDocumentAdatper if printing is cancelled.Svetoslav2013-10-312-0/+14
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layout and write may take some time during which the user can cancel printing. Currently we wait for the last operation, being write or layout, to complete before closing the print dialog. Now in such a scenario we request a cancellation of the ongoing operation. bug:11329523 Change-Id: Ia9d747163cc73509369a86c8b5afc83b7ee54859
* | | am 60fb1e28: am 714ba345: Merge "Complete implementation of the advanced ↵Svetoslav2013-10-288-76/+406
|\ \ \ | |/ / | | | | | | | | | | | | | | | print options." into klp-dev * commit '60fb1e28375b9c0dc7505214f3ab33bdd38f7aa8': Complete implementation of the advanced print options.
| * | am 714ba345: Merge "Complete implementation of the advanced print options." ↵Svetoslav2013-10-288-76/+406
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit '714ba34556572d36b1f9f8d9b860c4da24da6361': Complete implementation of the advanced print options.
| | * Complete implementation of the advanced print options.Svetoslav2013-10-288-76/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Implemented the advanced printer options integration. Now a print service may declare an advanced print options activity which may be launched by the user if the current printer supports advanced print options. These options are visible only to the print service that added them and it is the only party that will interpret the options. 2. Fixed a couple of bugs in the saved print jobs parsing. One was that if there are more than one page range, a half of the print job properties was not properly parsed. The other was that the media size constructor was using incorrect argument order, thus creating a media size with wring width. 3. Fixed and edge case where old print jobs and their docs can get stuck in the spooler. If the app did not write the requested pages we were not showing an error message, rather just finish the activity without canceling the print job and this print job is stuck in the spooler. Now we show an error message and the user may retry, cancel. If the user cancels the print job is also cancelled, thus no leftover in the spooler. 4. Fixed the background color of the print dialog to meet UX spec. bug:11241800 Change-Id: I352440bc86aec824a805883fc9579d96a06d11e6
* | | am 1aae2c47: am 2a40da55: Merge "Update the documentaton of the ↵Svetoslav Ganov2013-10-251-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | android.print package." into klp-dev * commit '1aae2c477772378b447da35717882c76aa39fb67': Update the documentaton of the android.print package.
| * | am 2a40da55: Merge "Update the documentaton of the android.print package." ↵Svetoslav Ganov2013-10-251-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | into klp-dev * commit '2a40da558b267b91ed0b0c9090656bdc02db2833': Update the documentaton of the android.print package.
| | * Merge "Update the documentaton of the android.print package." into klp-devSvetoslav Ganov2013-10-251-1/+1
| | |\
| | | * Update the documentaton of the android.print package.Svetoslav Ganov2013-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:10551786 bug:10551697 bug:10705082 bug:10741641 bug:11318976 bug:10550979 bug:10551761 Change-Id: I46ceb66a69b6d32d6b417356178f67f2e25e891a
| | * | Import translations. DO NOT MERGEBaligh Uddin2013-10-213-3/+3
| | |/ | | | | | | | | | | | | Change-Id: I1609ae278c6e7fe7af1d440df91940e0a0b07e45 Auto-generated-cl: translation import
* | | am a53e1f81: am 23757527: Merge "Hide the print dialog if the printing ↵Svetoslav Ganov2013-10-181-15/+56
|\ \ \ | |/ / | | | | | | | | | | | | | | | activity is destroyed." into klp-dev * commit 'a53e1f81380c018705dc56ee82ec2db155f23489': Hide the print dialog if the printing activity is destroyed.
| * | am 23757527: Merge "Hide the print dialog if the printing activity is ↵Svetoslav Ganov2013-10-181-15/+56
| |\ \ | | |/ | | | | | | | | | | | | | | | destroyed." into klp-dev * commit '237575278de8cae5d20ee333fcb2ccceee257d67': Hide the print dialog if the printing activity is destroyed.
| | * Merge "Hide the print dialog if the printing activity is destroyed." into ↵Svetoslav Ganov2013-10-191-15/+56
| | |\ | | | | | | | | | | | | klp-dev
| | | * Hide the print dialog if the printing activity is destroyed.Svetoslav Ganov2013-10-181-15/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. For an app to print it creates a PrintDocumentAdapter implementation which is passed to the print dialog activity. If the activity that created the adapter is destroyed then the adapter, which may rely on the activity state, may be in an invalid state. For example, an app creates an adapter and calls print resuting in the app activity and the print dialog activity being stacked. Now the user rotates the device which triggers the recreating of the activity stack (assume the app does not handle rotation). The recreated print dialog activity receives the intent that originally created it with containing the adapter that was constructed in the context of the old, now destroyed, app activity instance. To handle this we are limiting an app to be able to print only from and activity and when this activity is destroyed we mark the adapter as invalid which will result in hiding the print dialog activity. Note that if the app process is killed we already handle this in the print dialog activiy by registering a death recipient on the adapter binder. 2. In the PrintManager.PrintDocumentAdapterDelegate some of the state is accessed only on the main thread and some from miltiple threads. The code was trying to avoid locking for state that is not accessed by multiple threads but this is error prone and the benefit does not justify the complexity and added fragility. Now grabbing a lock all the time. 3. The PrintJobConfigActivity waits for it to bind to the print spooler service before instantiating its print controller and editor. However, these can be accessed by invoking some of the activity cycle callbacks. This change is adding null checks for the case where the activity callbacks are called before the binding to the spooler is completed. bug:11242661 Change-Id: Id906b3170e4f0a0553772dfa62686f06fdca0eaf
* | | | am 0acad1de: am 30d9161b: Merge "Printer list items have wrong width." into ↵Svetoslav2013-10-182-11/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | klp-dev * commit '0acad1de81799f765863118092caef0b6d306df5': Printer list items have wrong width.
| * | | am 30d9161b: Merge "Printer list items have wrong width." into klp-devSvetoslav2013-10-182-11/+9
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '30d9161b8e84652d9ac504b70adacaf729fdb58b': Printer list items have wrong width.
| | * | Merge "Printer list items have wrong width." into klp-devSvetoslav2013-10-182-11/+9
| | |\ \
| | | * | Printer list items have wrong width.Svetoslav2013-10-162-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. There was leftover code in the printers adapter that was hard coding the item width with no reason to do so. 2. Changed the icon view visibility to invisible to allow the text of all list items including save to PDF and all printers to be left aligned. bug:11225340 Change-Id: I5b51d0d30577699f5cd73c7c58521358653d135b
* | | | | am a225bbdd: am 54e55759: Merge "All printers list has incorrect padding and ↵Svetoslav Ganov2013-10-175-26/+159
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | item height." into klp-dev * commit 'a225bbddeccff76b92f18e620df0a8b773d4befd': All printers list has incorrect padding and item height.
| * | | | am 54e55759: Merge "All printers list has incorrect padding and item ↵Svetoslav Ganov2013-10-175-26/+159
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | height." into klp-dev * commit '54e5575924d3abba8129268d2d0553efc9a841eb': All printers list has incorrect padding and item height.
| | * | | All printers list has incorrect padding and item height.Svetoslav Ganov2013-10-175-26/+159
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. We were using the layout for the printer drop down from the print dialog as the list item in the all printers activity. This layout was not high enough. Now we have a separate layout for the drop down and for the list. Note that they are almost identical but this is better that writing java code to lookup the height from the theme and change it programatically since the java code is almost half the size of the layout and leads to spreading the logic in both the layout file and the java code. 2. The padding of the printers list was not correct. Now it mimics the bahavior in settings where we change the padding based on orientation. bug:11261157 Change-Id: I8507c4ee86e9196fe1777cf9577f1886ccfbb1ad