summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-09-12 16:45:37 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-12 16:45:37 -0700
commitf4f613b12738aa414fbaa23bad2ece7b9782fad7 (patch)
tree650817ee2e21748c12b9611058207311016165f4 /core/java
parentbd9daeaac7231c53e5aa53781bbd6fbbd9941a0c (diff)
parenta03cf04b8d7bd47dac94208cb1f5df3230a36e86 (diff)
am a03cf04b: am 25f17f29: Merge "Not change the print options on printer change if possible." into klp-dev
* commit 'a03cf04b8d7bd47dac94208cb1f5df3230a36e86': Not change the print options on printer change if possible.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/print/PrintAttributes.java12
-rw-r--r--core/java/android/print/PrintJob.java1
2 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java
index b1e427ed3d34..a1ffa8c65f62 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;
diff --git a/core/java/android/print/PrintJob.java b/core/java/android/print/PrintJob.java
index de28bd3c8225..42bea6d1f5e4 100644
--- a/core/java/android/print/PrintJob.java
+++ b/core/java/android/print/PrintJob.java
@@ -16,7 +16,6 @@
package android.print;
-
/**
* This class represents a print job from the perspective of
* an application.