Home | History | Annotate | Download | only in printspooler

Lines Matching refs:printJob

74             PrintJobInfo printJob = printJobs.get(i);
75 if (shouldNotifyForState(printJob.getState())) {
76 notifyPrintJobs.add(printJob);
93 private void createSimpleNotification(PrintJobInfo printJob) {
94 switch (printJob.getState()) {
96 createFailedNotification(printJob);
100 if (!printJob.isCancelling()) {
101 createBlockedNotification(printJob);
103 createCancellingNotification(printJob);
108 if (!printJob.isCancelling()) {
109 createPrintingNotification(printJob);
111 createCancellingNotification(printJob);
117 private void createPrintingNotification(PrintJobInfo printJob) {
119 .setContentIntent(createContentIntent(printJob.getId()))
120 .setSmallIcon(computeNotificationIcon(printJob))
121 .setContentTitle(computeNotificationTitle(printJob))
123 createCancelIntent(printJob))
124 .setContentText(printJob.getPrinterName())
131 private void createFailedNotification(PrintJobInfo printJob) {
133 .setContentIntent(createContentIntent(printJob.getId()))
134 .setSmallIcon(computeNotificationIcon(printJob))
135 .setContentTitle(computeNotificationTitle(printJob))
137 createCancelIntent(printJob))
139 createRestartIntent(printJob.getId()))
140 .setContentText(printJob.getPrinterName())
147 private void createBlockedNotification(PrintJobInfo printJob) {
149 .setContentIntent(createContentIntent(printJob.getId()))
150 .setSmallIcon(computeNotificationIcon(printJob))
151 .setContentTitle(computeNotificationTitle(printJob))
153 createCancelIntent(printJob))
154 .setContentText(printJob.getPrinterName())
161 private void createCancellingNotification(PrintJobInfo printJob) {
163 .setContentIntent(createContentIntent(printJob.getId()))
164 .setSmallIcon(computeNotificationIcon(printJob))
165 .setContentTitle(computeNotificationTitle(printJob))
166 .setContentText(printJob.getPrinterName())
188 PrintJobInfo printJob = printJobs.get(i);
191 computeNotificationIcon(printJob))).getBitmap());
192 builder.setSmallIcon(computeNotificationIcon(printJob));
193 builder.setContentTitle(computeNotificationTitle(printJob));
194 builder.setContentText(printJob.getPrinterName());
196 inboxStyle.addLine(computeNotificationTitle(printJob));
205 private String computeNotificationTitle(PrintJobInfo printJob) {
206 switch (printJob.getState()) {
209 printJob.getLabel());
213 if (!printJob.isCancelling()) {
215 printJob.getLabel());
219 printJob.getLabel());
224 if (!printJob.isCancelling()) {
226 printJob.getLabel());
230 printJob.getLabel());
244 intent.setData(Uri.fromParts("printjob", printJobId.flattenToString(), null));
249 private PendingIntent createCancelIntent(PrintJobInfo printJob) {
251 intent.setAction(INTENT_ACTION_CANCEL_PRINTJOB + "_" + printJob.getId().flattenToString());
252 intent.putExtra(EXTRA_PRINT_JOB_ID, printJob.getId());
253 intent.putExtra(EXTRA_PRINTJOB_LABEL, printJob.getLabel());
254 intent.putExtra(EXTRA_PRINTER_NAME, printJob.getPrinterName());
279 private static int computeNotificationIcon(PrintJobInfo printJob) {
280 switch (printJob.getState()) {
286 if (!printJob.isCancelling()) {