For print preview we show the pages the user selected in the range
affordance but the user can optionally further prune pages to be
printed by deselecting them in the preview. The deselected pages
change elevation and now also are dimmed.
bug:15912256
Change-Id: I53357b8e8b592387bbc26b937eda786bb4660d85
We keep track of historically used printers and when the print dialog
is opened we load them. We were selecting the first printer before the
historical ones are loaded which led to a case where the PDF printer
is selected and then a better printer appears but we have the PDF one
selected.
Also we were asking the printer spinner for the current printer but
if the data set of the adapter changes and we ask the spinner for the
selection we get a wrong answer because the adapter and the view are
off sync since the view is updated on the next message.
Change-Id: I0c12d2d3b19227a8f6af6e421b92013ec06cc021
After the preview list is scrolled we are preloading the
pages around the ones that are shown, so now if the user
does a slight adjustment (expected after a scroll) the
pages around are rendered. There was an off by one error
and one of the bitmaps of the shown pages was reused and
as a result the wrong content was shown.
Change-Id: If04aebf46bcc637491221c6218005ecc1a7253d2
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
It is possible that the orientation is chosen before the media size.
The code handling orientation change was wrognly expecting to have
a selected media size all the time resulting in a NPE.
bug:15512333
Change-Id: I9f2786af314641144a24c1d1363c8d2590b0df57
In a rare case it is possible that on write of a print document
adapter is called twice for the same pages with nothing being
changed. This happens if while doing a write we get an update
request which correctly avoids calling layout on the adapter
but does call on write as we ignore that we are waining for the
requested pages to be written. Fun.
Change-Id: I33d7d26c7c4b083dc7b66bf762697b6dafd1ccc4
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
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