Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79662942 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am c89e5a6a: Merge "Layout may be called with invalid print attributes." into klp-dev

* commit 'c89e5a6a':
  Layout may be called with invalid print attributes.
parents 2c345435 c89e5a6a
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -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()) {
                                        && printer.getCapabilities() == null) {
                                    if (!mCapabilitiesTimeout.isPosted()) {
                                        mCapabilitiesTimeout.post();
                                    }
                                    mCurrentPrinter.copyFrom(printer);
                                    refreshCurrentPrinter();
                                    return;
                                }
@@ -1268,11 +1275,11 @@ public class PrintJobConfigActivity extends Activity {
                                        && printer.getCapabilities() == null)) {
                                    if (!mCapabilitiesTimeout.isPosted()) {
                                        mCapabilitiesTimeout.post();
                                    }
                                    mCurrentPrinter.copyFrom(printer);
                                    updateUi();
                                    return;
                                }
                                }

                                // We just refreshed the current printer.
                                if (printer.getCapabilities() != null