diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-09-16 11:53:15 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2014-09-16 11:53:19 -0700 |
commit | d724a40136f168251f6f62e5a51ad73bf8fe5d1e (patch) | |
tree | e8a7125a9a1eab881ffcb34ba801a3b81fd41686 /packages | |
parent | 7c9823ac4fe63e22962b48c46059ff89f539de5b (diff) | |
download | frameworks_base-d724a40136f168251f6f62e5a51ad73bf8fe5d1e.zip frameworks_base-d724a40136f168251f6f62e5a51ad73bf8fe5d1e.tar.gz frameworks_base-d724a40136f168251f6f62e5a51ad73bf8fe5d1e.tar.bz2 |
Print preview disappearing on screen off/on.
We were not clearing the tracked printer when the print activity is
paused and then not setting the tracked printer when the activity
is resumed.
bug:17525271
Change-Id: Ib0fb29006bfcf5ad03dce24b3407cd96dc421442
Diffstat (limited to 'packages')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index 693e5ac..e177b1f 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -312,6 +312,14 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } @Override + public void onResume() { + super.onResume(); + if (mState != STATE_INITIALIZING && mCurrentPrinter != null) { + mPrinterRegistry.setTrackedPrinter(mCurrentPrinter.getId()); + } + } + + @Override public void onPause() { PrintSpoolerService spooler = mSpoolerProvider.getSpooler(); @@ -347,6 +355,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } mPrinterAvailabilityDetector.cancel(); + mPrinterRegistry.setTrackedPrinter(null); super.onPause(); } |