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

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

am 25f17f29: Merge "Not change the print options on printer change if possible." into klp-dev

* commit '25f17f29':
  Not change the print options on printer change if possible.
parents 4d1cef6b 25f17f29
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -226,6 +226,12 @@ public final class PrintAttributes implements Parcelable {
        StringBuilder builder = new StringBuilder();
        builder.append("PrintAttributes{");
        builder.append("mediaSize: ").append(mMediaSize);
        if (mMediaSize != null) {
            builder.append(", orientation: ").append(mMediaSize.isPortrait()
                    ? "portrait" : "landscape");
        } else {
            builder.append(", orientation: ").append("null");
        }
        builder.append(", resolution: ").append(mResolution);
        builder.append(", margins: ").append(mMargins);
        builder.append(", colorMode: ").append(colorModeToString(mColorMode));
@@ -880,12 +886,6 @@ public final class PrintAttributes implements Parcelable {
         * @param bottomMils The bottom margin in mils (thousands of an inch).
         */
        public Margins(int leftMils, int topMils, int rightMils, int bottomMils) {
            if (leftMils > rightMils) {
                throw new IllegalArgumentException("leftMils cannot be less than rightMils.");
            }
            if (topMils > bottomMils) {
                throw new IllegalArgumentException("topMils cannot be less than bottomMils.");
            }
            mTopMils = topMils;
            mLeftMils = leftMils;
            mRightMils = rightMils;
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.print;


/**
 * This class represents a print job from the perspective of
 * an application.
+201 −115

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -447,7 +447,9 @@ final class RemotePrintService implements DeathRecipient {
                Slog.i(LOG_TAG, "[user: " + mUserId + "] stopPrinterTracking()");
            }
            // We are no longer tracking the printer.
            mTrackedPrinterList.remove(printerId);
            if (mTrackedPrinterList == null || !mTrackedPrinterList.remove(printerId)) {
                return;
            }
            if (mTrackedPrinterList.isEmpty()) {
                mTrackedPrinterList = null;
            }