Merge "Merge \"Set PrintDocumentInfo#mDataSize\" into nyc-mr1-dev am: ba229ce88a" into nyc-mr1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
7e19c2d0c6
@@ -526,6 +526,14 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
|
||||
.setContentType(info.getContentType())
|
||||
.setPageCount(pageCount)
|
||||
.build();
|
||||
|
||||
File file = mFileProvider.acquireFile(null);
|
||||
try {
|
||||
adjustedInfo.setDataSize(file.length());
|
||||
} finally {
|
||||
mFileProvider.releaseFile();
|
||||
}
|
||||
|
||||
mPrintJob.setDocumentInfo(adjustedInfo);
|
||||
mPrintJob.setPages(document.printedPages);
|
||||
}
|
||||
@@ -3077,6 +3085,14 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
|
||||
.setContentType(oldDocInfo.getContentType())
|
||||
.setPageCount(newPageCount)
|
||||
.build();
|
||||
|
||||
File file = mFileProvider.acquireFile(null);
|
||||
try {
|
||||
newDocInfo.setDataSize(file.length());
|
||||
} finally {
|
||||
mFileProvider.releaseFile();
|
||||
}
|
||||
|
||||
mPrintJob.setDocumentInfo(newDocInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user