diff options
| author | Svetoslav <svetoslavganov@google.com> | 2013-09-10 21:08:32 -0700 | 
|---|---|---|
| committer | Svetoslav <svetoslavganov@google.com> | 2013-09-12 14:29:53 -0700 | 
| commit | cc65b0c325b88c466763712f76148a6f5b8a5b3f (patch) | |
| tree | 7fa5afc4cd63434bf577516112449858bd2a7f66 /core/java/android/print/PrintAttributes.java | |
| parent | 26267660957a4428a66d8f142e2bdfa6ce6fe12f (diff) | |
| download | frameworks_base-cc65b0c325b88c466763712f76148a6f5b8a5b3f.zip frameworks_base-cc65b0c325b88c466763712f76148a6f5b8a5b3f.tar.gz frameworks_base-cc65b0c325b88c466763712f76148a6f5b8a5b3f.tar.bz2  | |
Not change the print options on printer change if possible.
If the user selects some print options from the dialog and then
changes the printer to one that has the same capabilities the
selections in the UI should not change.
bug:10631856
Change-Id: Ia76ce58c446815e3498d2f4b4739dee62d11d96a
Diffstat (limited to 'core/java/android/print/PrintAttributes.java')
| -rw-r--r-- | core/java/android/print/PrintAttributes.java | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java index b1e427e..a1ffa8c 100644 --- a/core/java/android/print/PrintAttributes.java +++ b/core/java/android/print/PrintAttributes.java @@ -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;  | 
