Always trigger a write if no pages are written

If a previous write was canceled we can end up in the situation where
the layout reports "not changes since layout" but no pages have been
written.

In this case we have to trigger a write even if the layout reports that
nothing changed.

Fixes: 24110832
Change-Id: I4b3f69581e63f4084cd3712861288ded7d9c9249
This commit is contained in:
Philip P. Moltmann
2016-07-13 17:05:03 -07:00
parent acef1eb7c6
commit fde8ecc2ea

View File

@@ -94,6 +94,7 @@ public final class RemotePrintDocument {
// but the content has changed.
if (mNextCommand == null) {
if (mUpdateSpec.pages != null && (mDocumentInfo.changed
|| mDocumentInfo.writtenPages == null
|| (mDocumentInfo.info.getPageCount()
!= PrintDocumentInfo.PAGE_COUNT_UNKNOWN
&& !PageRangeUtils.contains(mDocumentInfo.writtenPages,