diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2013-10-12 17:37:38 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-12 17:37:38 -0700 |
commit | ff98feec6f37485b7f5e025d221fe5c9ae147b03 (patch) | |
tree | 831cce720d8e23113b78c34183c3221af446ec26 /packages/PrintSpooler | |
parent | 603ece2e8e3f5a73007fd42d3be52123a351eef0 (diff) | |
parent | 79ddf835227283979dc353e57711a9d6dff8edb0 (diff) | |
download | frameworks_base-ff98feec6f37485b7f5e025d221fe5c9ae147b03.zip frameworks_base-ff98feec6f37485b7f5e025d221fe5c9ae147b03.tar.gz frameworks_base-ff98feec6f37485b7f5e025d221fe5c9ae147b03.tar.bz2 |
am 79ddf835: am bececbfa: Merge "Printed document size not persisted." into klp-dev
* commit '79ddf835227283979dc353e57711a9d6dff8edb0':
Printed document size not persisted.
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java index 04b50b3..636e245 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java @@ -730,6 +730,7 @@ public final class PrintSpoolerService extends Service { private static final String ATTR_NAME = "name"; private static final String ATTR_PAGE_COUNT = "pageCount"; private static final String ATTR_CONTENT_TYPE = "contentType"; + private static final String ATTR_DATA_SIZE = "dataSize"; private final AtomicFile mStatePersistFile; @@ -893,6 +894,8 @@ public final class PrintSpoolerService extends Service { documentInfo.getContentType())); serializer.attribute(null, ATTR_PAGE_COUNT, String.valueOf( documentInfo.getPageCount())); + serializer.attribute(null, ATTR_DATA_SIZE, String.valueOf( + documentInfo.getDataSize())); serializer.endTag(null, TAG_DOCUMENT_INFO); } @@ -1111,10 +1114,13 @@ public final class PrintSpoolerService extends Service { ATTR_PAGE_COUNT)); final int contentType = Integer.parseInt(parser.getAttributeValue(null, ATTR_CONTENT_TYPE)); + final int dataSize = Integer.parseInt(parser.getAttributeValue(null, + ATTR_DATA_SIZE)); PrintDocumentInfo info = new PrintDocumentInfo.Builder(name) .setPageCount(pageCount) .setContentType(contentType).build(); printJob.setDocumentInfo(info); + info.setDataSize(dataSize); parser.next(); skipEmptyTextTags(parser); expect(parser, XmlPullParser.END_TAG, TAG_DOCUMENT_INFO); |