summaryrefslogtreecommitdiffstats
path: root/core/java/android/print/IPrintSpoolerClient.aidl
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2013-09-27 10:48:31 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2013-09-27 17:26:44 -0700
commitdd68da2741fa63070d5ad206020dcccb9f429a5a (patch)
tree91b1356d1d74a02fa9af841224aab4134a10da76 /core/java/android/print/IPrintSpoolerClient.aidl
parent231bd6c514f15cb0b42a04d4fc7fc9631c743686 (diff)
downloadframeworks_base-dd68da2741fa63070d5ad206020dcccb9f429a5a.zip
frameworks_base-dd68da2741fa63070d5ad206020dcccb9f429a5a.tar.gz
frameworks_base-dd68da2741fa63070d5ad206020dcccb9f429a5a.tar.bz2
Print job files and print job records not always cleaned up.
1. We want the files for a print job to be removed as early as possible typically because the print job was cancelled, completed, the app or the spooler crashed during print job construction. We were keeping around in the spooler and hence to disc infos for jobs that are in final state since the app that created them may hold a reference to a local print job objec whose info it can access to get the latest print job state potentially after the job reached final state. The issue was that we were persisting to disc created print jobs which were during construction which requires careful handling for the various cases above. This is tricky and error prone. We used to tell the spooler to forget the print jobs infos when the app that created them died. The implementation to forget a print job was not careful and was nuking currently running print jobs in addition to the ones in a terminal state. Further, if the app dies before a print job is completed we were left with a stale print job in the spooler since we missed the signal to forget it (assuming we forget only inactive jobs). These issues suggest that the approach is problematic. Now we have a cache of print job infos for the jobs an app created. This cache is updated when the state of a print jobs changes using the new print job state observation code. When the app dies we remove the cached jobs for that app. Now if the app calls to get the print jobs it gets the cached ones, i.e. the print jobs it created during its lifetime, plus the print jobs that are still active fetched from the spooler. Note that transient state cannot be kept in the spooler since we unbind from it if there is no work and it may get killed. 2. Improved the print sub-system logging code to show the cached print job infos for apps and also dump the print job PDF file names. bug:10958357 Change-Id: I6f7c1968b6b7ba5be182a10df044ff7ea1fc3a61
Diffstat (limited to 'core/java/android/print/IPrintSpoolerClient.aidl')
-rw-r--r--core/java/android/print/IPrintSpoolerClient.aidl2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/print/IPrintSpoolerClient.aidl b/core/java/android/print/IPrintSpoolerClient.aidl
index 0cf00cc..8270812 100644
--- a/core/java/android/print/IPrintSpoolerClient.aidl
+++ b/core/java/android/print/IPrintSpoolerClient.aidl
@@ -29,5 +29,5 @@ oneway interface IPrintSpoolerClient {
void onPrintJobQueued(in PrintJobInfo printJob);
void onAllPrintJobsForServiceHandled(in ComponentName printService);
void onAllPrintJobsHandled();
- void onPrintJobStateChanged(in PrintJobId printJobId, int appId);
+ void onPrintJobStateChanged(in PrintJobInfo printJob);
}