OSDN Git Service

Do not allow printing until preview is updated
authorPhilip P. Moltmann <moltmann@google.com>
Fri, 24 Mar 2017 23:17:13 +0000 (16:17 -0700)
committerPhilip P. Moltmann <moltmann@google.com>
Sat, 25 Mar 2017 00:18:33 +0000 (17:18 -0700)
commit378cddbc41dae55e9a11faaa251b80fb90878b34
tree818bbbbe5ae60194f6b4159cc99bff27d724d941
parent90b741f9488b67c9e7d2c717a150860c363b09a1
Do not allow printing until preview is updated

Otherwise we might end up in the situation where we print something that
was not previewed.
This is of course bad for the user as he prints something he has not seen.
It is also bad for the print spooler as in the case the layout did not
describe the amount of pages, we do not know the number of pages available
until the update is complete.

We now allow changing of printer at any time unless printing is in final
stage. If we don't allow this the changing of printer would be blocked
until the intial document was written which might take some time.

Fixes: 36599750
Test: cts-tradefed run cts-dev -m Print
Change-Id: I93e910c02f2a770008b845028f0adf17b3d410e2
packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java