OSDN Git Service

The undefined media sizes for both orientations not properly constructed.
authorSvetoslav Ganov <svetoslavganov@google.com>
Mon, 7 Oct 2013 02:44:14 +0000 (19:44 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Mon, 7 Oct 2013 02:44:19 +0000 (19:44 -0700)
We have constants for an app to specify an undefined media size in portrait
and such in landscape. The constants for these media sizes had the width and
height dimesions swapped.

bug:11099831

Change-Id: Ic09227c3a03429fc5a4a157abc15fea87d3ad8be

core/java/android/print/PrintAttributes.java

index ec979b3..e1a9cb7 100644 (file)
@@ -282,7 +282,7 @@ public final class PrintAttributes implements Parcelable {
          */
         public static final MediaSize UNKNOWN_PORTRAIT =
                 new MediaSize("UNKNOWN_PORTRAIT", "android",
-                        R.string.mediasize_unknown_portrait, Integer.MAX_VALUE, 1);
+                        R.string.mediasize_unknown_portrait, 1, Integer.MAX_VALUE);
 
         /**
          * Unknown media size in landscape mode.
@@ -293,7 +293,7 @@ public final class PrintAttributes implements Parcelable {
          */
         public static final MediaSize UNKNOWN_LANDSCAPE =
                 new MediaSize("UNKNOWN_LANDSCAPE", "android",
-                        R.string.mediasize_unknown_landscape, 1, Integer.MAX_VALUE);
+                        R.string.mediasize_unknown_landscape, Integer.MAX_VALUE, 1);
 
         // ISO sizes