diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2013-07-22 12:32:03 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2013-07-22 13:07:09 -0700 |
commit | 88d199130d44c6bacb383a7757e782cf97483c68 (patch) | |
tree | 454e94ec561afdb80a9ed209e12540c70e5df8eb /packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java | |
parent | 597945fd3a6b52ac70bb9afc5ec8c59039fffd77 (diff) | |
download | frameworks_base-88d199130d44c6bacb383a7757e782cf97483c68.zip frameworks_base-88d199130d44c6bacb383a7757e782cf97483c68.tar.gz frameworks_base-88d199130d44c6bacb383a7757e782cf97483c68.tar.bz2 |
Implement persistence/restoring of print spooler state.
1. Implemented the persistence and restoring of the print spooler state.
The print spooler state is saved as an XML on every print job change
and is restored when we bind to the spooler. The system does not
unbind from the spooler until the state persistence completes. We
are now storing the entire state, i.e. all print jobs, when a single
one changes. This is not optimal but we are not expecting to have
many such at the same time, so for now we err for simplicity of
implementation.
2. Enforcing a non-empty print job name.
3. Hidden the STATE_CREATED print job state which should never be visible to a
client since this is the state of a print job during construction, i.e. the
print dialog is up and we are doing back and forth with the app.
4. Fixed some PrintAttributes APIs that were incorrectly taking in a PackageManager
instance.
5. Updated the PrintSpooler build file due to splitting the framework into multiple
jars.
Change-Id: I52c88eaa1ec9c64920359cc143c79832a4c3d25b
Diffstat (limited to 'packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java index ad5e5b0..26d2a33 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java @@ -65,6 +65,8 @@ public final class PrintSpoolerService extends Service { @Override public IBinder onBind(Intent intent) { + mSpooler.restorePersistedState(); + return new IPrintSpooler.Stub() { @Override public void getPrintJobInfos(IPrintSpoolerCallbacks callback, |