diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index f71cafe584ccc..3e0d7e557de1b 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -1735,10 +1735,12 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } else if (spinner == mOrientationSpinner) { SpinnerItem orientationItem = mOrientationSpinnerAdapter.getItem(position); PrintAttributes attributes = mPrintJob.getAttributes(); - if (orientationItem.value == ORIENTATION_PORTRAIT) { - attributes.copyFrom(attributes.asPortrait()); - } else { - attributes.copyFrom(attributes.asLandscape()); + if (mMediaSizeSpinner.getSelectedItem() != null) { + if (orientationItem.value == ORIENTATION_PORTRAIT) { + attributes.copyFrom(attributes.asPortrait()); + } else { + attributes.copyFrom(attributes.asLandscape()); + } } }