Showing
1 changed file
with
7 additions
and
4 deletions
@@ -143,11 +143,14 @@ public class PrintingJob extends PrintDocumentAdapter { | @@ -143,11 +143,14 @@ public class PrintingJob extends PrintDocumentAdapter { | ||
143 | : printJob.getInfo().getState(); | 143 | : printJob.getInfo().getState(); |
144 | 144 | ||
145 | if (state == PrintJobInfo.STATE_COMPLETED) { | 145 | if (state == PrintJobInfo.STATE_COMPLETED) { |
146 | - printing.onCompleted(PrintingJob.this, true, ""); | 146 | + printing.onCompleted(PrintingJob.this, true, null); |
147 | wait[0] = false; | 147 | wait[0] = false; |
148 | - } else if (state == PrintJobInfo.STATE_CANCELED | ||
149 | - || state == PrintJobInfo.STATE_FAILED) { | ||
150 | - printing.onCompleted(PrintingJob.this, false, "User canceled"); | 148 | + } else if (state == PrintJobInfo.STATE_CANCELED) { |
149 | + printing.onCompleted(PrintingJob.this, false, null); | ||
150 | + wait[0] = false; | ||
151 | + } else if (state == PrintJobInfo.STATE_FAILED) { | ||
152 | + printing.onCompleted( | ||
153 | + PrintingJob.this, false, "Unable to print"); | ||
151 | wait[0] = false; | 154 | wait[0] = false; |
152 | } | 155 | } |
153 | } | 156 | } |
-
Please register or login to post a comment