We are updating the printed content asynchronously. If the user cancels
printing before the first update is complete the spooler components are
in a destroyed state but we attempt to handle the completed update resulting
in a crash. Now if printing is cancelled we ignore the update result.
bug:
18525491
Change-Id: I1ef47a17de19896cba2c7a1dd2bfc205065e0a5a
protected Void doInBackground(Void... params) {
synchronized (mLock) {
try {
- mRenderer.closeDocument();
+ if (mRenderer != null) {
+ mRenderer.closeDocument();
+ }
} catch (RemoteException re) {
/* ignore */
}
requestCreatePdfFileOrFinish();
} break;
+ case STATE_PRINT_CANCELED: {
+ updateOptionsUi();
+ } break;
+
default: {
updatePrintPreviewController(document.changed);