diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-10-14 19:00:38 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-14 19:00:38 -0700 |
commit | 9773b379fecb7671bc02c1096ee23875d727f827 (patch) | |
tree | d27a51c86536e73283bb6de26cca33601e00cb4e /packages/PrintSpooler | |
parent | 0e10dfebf19efd3ebe6f70800c5a09243f7da2ac (diff) | |
parent | 796629422f3023c1cc3c8d970f5b66c1b34599d2 (diff) | |
download | frameworks_base-9773b379fecb7671bc02c1096ee23875d727f827.zip frameworks_base-9773b379fecb7671bc02c1096ee23875d727f827.tar.gz frameworks_base-9773b379fecb7671bc02c1096ee23875d727f827.tar.bz2 |
am 79662942: am c89e5a6a: Merge "Layout may be called with invalid print attributes." into klp-dev
* commit '796629422f3023c1cc3c8d970f5b66c1b34599d2':
Layout may be called with invalid print attributes.
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java index 22a9950..3a23b3e 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java @@ -1248,13 +1248,20 @@ public class PrintJobConfigActivity extends Activity { continue; } + // If nothing changed - done. + if (mCurrentPrinter.equals(printer)) { + return; + } + // If the current printer became available and has no // capabilities, we refresh it. if (mCurrentPrinter.getStatus() == PrinterInfo.STATUS_UNAVAILABLE && printer.getStatus() != PrinterInfo.STATUS_UNAVAILABLE - && printer.getCapabilities() == null - && !mCapabilitiesTimeout.isPosted()) { - mCapabilitiesTimeout.post(); + && printer.getCapabilities() == null) { + if (!mCapabilitiesTimeout.isPosted()) { + mCapabilitiesTimeout.post(); + } + mCurrentPrinter.copyFrom(printer); refreshCurrentPrinter(); return; } @@ -1268,10 +1275,10 @@ public class PrintJobConfigActivity extends Activity { && printer.getCapabilities() == null)) { if (!mCapabilitiesTimeout.isPosted()) { mCapabilitiesTimeout.post(); - mCurrentPrinter.copyFrom(printer); - updateUi(); - return; } + mCurrentPrinter.copyFrom(printer); + updateUi(); + return; } // We just refreshed the current printer. |