bdace63d5bda8a3f19300b52064a0f77bc5d3754 |
14-Jun-2017 |
Philip P. Moltmann <moltmann@google.com> |
Select the right pages to scrap The code before overwrote some data the outside code expected to not be modified which resulted in the scrapped pages to be offset. Test: - cts-tradefed run cts-dev -m Print - Tried to repro case in the bug Bug: 62296301 Change-Id: If3f250dbca43125bbbe9faadc5183a6dbaa69481
ageRangeUtils.java
|
f7a5b4fb30792789d9e436bb5107f1a6d743d49c |
16-Mar-2017 |
Philip P. Moltmann <moltmann@google.com> |
Handle corrupted files when cutting out pages Before the print spooler crashes, now we crash the printing app. Bonus: Renamed and documented fields as I could never remeber what they mean. Test: Added new (disabled) test to CTS print tests that emulated the scenario Bug: 35350768 Change-Id: I41c094960d96f46d274e9f87381bcda5274d5612
ageRangeUtils.java
|
0c470821d35d1aa13f051c883d9ab7ed292f81df |
03-Jun-2016 |
Philip P. Moltmann <moltmann@google.com> |
Cache resources needed to sort media sizes. - Cache media_standard_iso - Cache labels between configuration changes (localization might change labels) - Use ints instead of String's for standards - Use HashMap instead of Array map as the lookup is faster for larger arrays Fixes: 29068056 Change-Id: I027c80fac4d7e8ea6c2cac0f1a2d52b54807f5be
ediaSizeUtils.java
|
c6c319e9889874a1babafa4301dabe193737ebd9 |
01-Apr-2016 |
Philip P. Moltmann <moltmann@google.com> |
Print Activity: Use a single (re-implemented) parsing logig for page ranges. - Support unbounded ranges, e.g. 4- == 4-pageCount and -2 == 1-2 - Do not allow reverse ranges, i.e. 7-3 is not allowed anymore - restrict characters that can be typed into field - force numeric keyboard - Fix bug that we update the selected pages even if the page ranges are invalid Fixes: 13126748 Change-Id: I515d9346ceb152a41b7260792c5dd9bd91b27cab
ageRangeUtils.java
|
66c96591e2ddb464c67e60dbf4193ef4ec8a620b |
24-Feb-2016 |
Philip P. Moltmann <moltmann@google.com> |
Add "app printer activity" and always keep the print service state updated. Also fiddle with the UI to use more standard values. To be sure the print service state alwasy updated I changed PrintManager.getPrintServices to return a loader which just wraps a registerListener/getList/removeListener combo. I also added a new function to enabled/disable a print service to be keep all updating logic inside the PrintManagerService->UserState. Then I changed all code to use this new interface. Detailed comments: PrintServiceInfo: - I had to add the enabled state to the PrintServiceInfo as some users of PrintManager.getPrintServices want all services but then display different data depending on the enabled state. Of course I could have created two PrintManager.getPrintServices-loaders to load the two separate list of services. I think it is much easier to add this property though. It is updated every time new data is returned to the PrintManager.getPrintServices-loader. AddPrinterActivity: - This is shown as a dialog-style overlay to indicate that the user will return to the select-printers activity. It contains of three list that are updated via separate loaders. - The recommended services will be added later to keep this path set small. PrintActivity: - There are two small places where we have to update the data when we get a new list of print services. - In very, very rare conditions it can happen that the print service of the current printer gains or looses the "advancedOptions" activity - If we have no enabled print services we want to show "Add printer" instead of "All printers...". - Also the print registry is not the only loader anymore, hence we have to assign loader ids to it to not conflict with the other loaders in this activity. - Small bug in onPrintersChanged: If a printer is selected and the print service of this printer gets disabled the holder goes into "removed" state which disables the printer. When the print service is then enabled again, we forgot to re-enable the holder. PrinterRegistry: - The registry assumed that the FusedPrinterProvider was the only loader in the activity. This is not true anymore, hence it has to assign the appropriate loader ids. - The FusedPrinterProvider has an internal loader, hence we have to forward a loader Id into it. - The PrintRegistry is only called backed for a single loader, hence no need to check the loader-id. SelectPrinterActivity: - The AddPrinterDialog was removed as we now have the AddPrinterActivity. - Added a loader for the enabled services to update the empty state. - Added dedicated loader Id for the PrinterRegistry again. - If we have no enabled services, the SelectPrinterActivity chainloads the AddPrinterActivity as this is the only thing the user can do anyway. "Save a click". This should only happen when the activity is create the first time. - Moved the "add printer" from the menu item to the list of printers as suggested by UX and Zach. PrintManagerService, UserState and IPrintManagerParamtersTest: - As the only place where the print service state is updated is now the userstate, we have no more sychronization problems. Whohoo. - The users can now register for changes to the print services similar as they can register for changes to the print jobs. - UserState.getPrintServices is the only function can exposes any knowledge of the print services to the outside world. Change-Id: I9be2c7300431e06aaff9bdf7eb36120d869b56ac
rintOptionUtils.java
|
0d1e622000820bf3d83419757929367ecb9f1fdd |
09-Jan-2016 |
Philip P. Moltmann <moltmann@google.com> |
ApprovedServices might be null, handle the case: Bug: 26454066 Change-Id: I909d84d08a1f6d29f486e8ea6097e782b054864e
pprovedPrintServices.java
|
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
pprovedPrintServices.java
|
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
pprovedPrintServices.java
|
df6444931b030d3cdd9769e23f16f0a16fe9c654 |
30-Aug-2014 |
Svet Ganov <svetoslavganov@google.com> |
Switching to raw byte copy of bitmaps for print preview. Using compression and decompression for moving bitmap data acorss processes is slow as compression is expensive. This change switches to using direct streaming of the bitmap data. bug:15938254 Change-Id: I78bc450031ee60ada4c3b66f14586a73c72ce34f
itmapSerializeUtils.java
|
525a66b2bb5abf844aff2109bdc9ed819566bece |
15-Jun-2014 |
Svet Ganov <svetoslavganov@google.com> |
Adding print preview. This change adds the pring preview part of the new print UX. The UI has two parts, the top section is the print options and the bottom section print preview with a list of pages. The user can interact only with one of them. When print options are expanded they cover the preview content and a scrim is laid out on top of the preview. Tapping the scrim collapses the print options. When the user types in page ranges and closes the options to look at the preview, the latter is updated to show only these pages. In the list of pages the user can further prune pages by deselecting them. Change-Id: I0b23d2c598afe2a34400ccfa43e4e935af83c72f
ageRangeUtils.java
|
a798c0a984f29f7180883a61839f68d2cbf0c6ce |
15-May-2014 |
Svetoslav <svetoslavganov@google.com> |
Refactor printing Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
ediaSizeUtils.java
ageRangeUtils.java
rintOptionUtils.java
|