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
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
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
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
These files were dropped by the translation
pipelines because they do not contain any
translated elements, but in reality they
are needed.
Bug: 11226380
This is a resource file cotaining the media sizes for the Catalan
locale. Without it the print spooler crashes all the time for that
locale since it cannot construct the PDF printer correctly.
bug:11226380
Change-Id: I7fa9c9bf4ed073e5f4ddf0d0fe9de4998e3467d4
1. Updated the print spooler icon shown in the action bar
when searching for printers in the all printers activity.
2. If the current printer's capabilities are not immediately
available the page count label in the dialog contained the
argument placeholders.
bug:10983508
Change-Id: Id4f78d6cc31647f043f8e3044ab54f30584d1ebe
1. If an error happens during layout or write we show an error
message with the string provided by the application which
has an OK button to retry or tap outside to cancel.
2. Updated the targed and min SDK version for the PrintSpooler.
bug:11127269
Change-Id: I4301cf3716119b1e33b95347a8451fc1c128343b
Initially we show the print dialog and when the user presses print
we show a generating dialog with an indefinite spinner and a cancel
button. The transition between the two UIs which are really different
layouts show in the print activity is animated. In the middle of
the animation from print to generating UI there was a jump of the
content and an undesired window animation kicking in. This is a
side effect of changing the activity to floating so now changing the
container size was causing window resize and hence animation. Fun!
bug:10983508
Change-Id: I7d88e073c55863b945cdb50822401592f32d44c3
Some regions have different media size standards and the fake PDF
printer shows the media sizes for the current locale. Interestingly,
these files were skipped in my previous change while I remember
adding them - maybe did not upload the patch.
bug:11147920
Change-Id: I819ab08fbef08305be89e3acf297328b1a0ded11
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
1. If a printer is not available it has to disabled and grayed out.
2. Cancle a print job if the app does not provide the requested pages.
3. Fix current printer selection flicker when the print dialog is
showing up. Often the current printer is initially set to the user's
favorite and then it is changed back to the PDF one.
bug:10983508
Change-Id: I8d53eb992cf1c92675ec09f61b2ec272b962fa68
The print dialog was full-screen which was not really needed and was
causing the dialog to jump instead of animate up/down when the IME
shows/hides.
bug:11116648
Change-Id: Ifb46fd80a90948270a1fa9c875258b8d0cdfc111
1. Updated the empty state of the all printers activity to show no printers message
if the user is searching and there are no matches and a searching for printers
message if the user is not filtering the printers list.
2. Adding the fake PDF printer after the historical printers are loaded to avoid the case
where we select the PDF printer and immediately after that the most used printer is
selected resulting in an undesirable UI flicker.
3. Fixed a bug where if the most used printer which is initially considered unavailable
is reported by the print service as available but the UI is not properly updated
leaving the user in no way to click on the print button.
bug: 10983508
Change-Id: I60fdb7761332850fd5b9ffc0cb572a6213024dba
The empty state is now showing searching for printers hint if
the user is not searching, otherwise the empty state's hint is
a searching for printers message.
bug:10983508
Change-Id: I3df79c167546998c8055d9ff85efa8b460a15e48
1. The refresh button in a print notification was using
wrong asset.
2. If the page count is unknown, just not show the page
count instead unknown.
bug:10983508
Change-Id: I15f1fcbff60fe1f30d37868864da41550bb14487
1. Initially we have a single printer, the fake PDF printer, and
wait for printers to be discovered. This printer was handling
only a couple of media sizes. Hence, if the app provides a
media size hint and the PDF printer does not support it, we
were essentially ignoring the suggested media size since it
was not supported by the selected printer and we fell back to
the default paper size for that printer. The fake PDF printer
should support all predefined media sizes.
2. The list of available paper sizes was shown in the order they
are added ignoring the current locale. It is much better user
experience if the media sizes used in the current locale are
shown at the top and all others after that. Also the media
sizes for the current locale should be alphabetically ordered
so the user can quickly find the desired one.
3. The orientation was reset on media size or printer change.
bug:10564537
Change-Id: Iaa0d42242730ce69cea3effd4d0f4bc087068804
1. Limit the width of the dropdown of the printers list.
2. Add icons the the list in the all pritners activity.
3. Update the empty state view for the all printers activity.
bug:10983508
Change-Id: I19effcf32770fdda278009a060b5170a3f29988e
The user can select all printers from the print dropdown to get to
a search for printers activity where one can filter out the list
of a available printers. We did not have an empty state UI for the
case when the query yields no printers.
bug:11009053
Change-Id: I6b45517b8a7b319992019a1bf65858319a19a0de
A print service may choose to provide only the printer info and then when
it is requested to start tracking the state of the printer, the service
should provide the printer capabilities. If the capabilities are not
received within ten seconds we mark the printer as unavailable and stop
tracking it.
bug:10748639
Change-Id: I9171cb5dc116fd321c23a8e4ab55109448e2fc6a
1. The printers in the printers list of settings change position if
they are updated. The settings app is using hidden platform APIs
the this change fixes.
2. Enable ProGuard for the PrintSpooler.
3. Added icons on the list of printers so the user knows which
print service used the printer. Now the user can know when
he is using cloud print and maybe incurring data costs vs
local printer discovered by a vendor plug in.
bug:10955751
Change-Id: I292f48b424cb561218fdb424d0388f4d786d8339
1. If the printer is unavailable we should not allow the user
to select it. Rather, show it grayed out.
2. Some string changes requeted by translators.
bug:10917222
Change-Id: I370f05f9c8e70e3f077db7eb02cf48e19a59925d
The user has to explicitly enable a print service from the settings UI
before using it. Usually, users very rarely if at all interact with print
services, therefore all print service management task are performed from
the print settings. We also have to get user consent warning that the
user's data is about to be given to a third-party app. We now post a
notification allowing the user to go directly to the settings screen to
turn the service on.
bug:10447510
Change-Id: Iea56c0825f0bf38328ad94912f0ea5576e9339b3