OSDN Git Service

Fail only scheduled print jobs, i.e. handed to a service, if the service is disabled.
authorSvetoslav Ganov <svetoslavganov@google.com>
Sat, 12 Oct 2013 19:35:41 +0000 (12:35 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Sat, 12 Oct 2013 19:35:44 +0000 (12:35 -0700)
commit9b6d3a153f44010a75907c6a9742c89a57d4e5ee
treeb4a4e1be4453572678ac735ec87fd15a147cfc1a
parent5a7831733be2040fde78027fe2f7eca4f4cc2e28
Fail only scheduled print jobs, i.e. handed to a service, if the service is disabled.

When a print service is disabled we assume all print jobs for it failed as we have
no way to know what happens to them. However we are also failing created print jobs,
i.e. ones not given to the service. Such jobs are in process of construction and
the print dialog is up. We should not fail such jobs as the dialog can still modify
their state and potentially select a print from a different service. Therefore, we
leave them alone and they will be failed if when constructed are passed to a
disabled/uninstalled service.

bug:11197432

Change-Id: Ie4fe54327e3e25776b1dd572be2dfafdd700c2e5
core/java/android/print/PrintJobInfo.java
packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
services/java/com/android/server/print/UserState.java