summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-10-14 17:19:34 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-14 17:19:34 -0700
commit796629422f3023c1cc3c8d970f5b66c1b34599d2 (patch)
treefcbcdcd36692333f1b95933d9a55f82ca774b9f8 /packages
parent2c345435458b8b6ad105bf14d3655e0f6836278b (diff)
parentc89e5a6af1514320f90329dadebdfa26a3ae93d2 (diff)
downloadframeworks_base-796629422f3023c1cc3c8d970f5b66c1b34599d2.zip
frameworks_base-796629422f3023c1cc3c8d970f5b66c1b34599d2.tar.gz
frameworks_base-796629422f3023c1cc3c8d970f5b66c1b34599d2.tar.bz2
am c89e5a6a: Merge "Layout may be called with invalid print attributes." into klp-dev
* commit 'c89e5a6af1514320f90329dadebdfa26a3ae93d2': Layout may be called with invalid print attributes.
Diffstat (limited to 'packages')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java19
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.