Set copies to one when saving to PDF.

One can save only one copy to PDF. Showing more that one copy when saving
to PDF enven in a disabled input box is confusing to the user. We now set
the copies to one when the PDF printer is selected.

bug:17631303

Change-Id: Ia04d144efc899e7f3836c19349d9c87f3ae8f0f0
This commit is contained in:
Svet Ganov
2014-10-23 12:39:08 -07:00
committed by Svetoslav Ganov
parent bec0c53a40
commit 45e50e99cd

View File

@@ -1410,12 +1410,16 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
mCopiesEditText.setEnabled(true);
mCopiesEditText.setFocusableInTouchMode(true);
} else {
CharSequence text = mCopiesEditText.getText();
if (TextUtils.isEmpty(text) || !MIN_COPIES_STRING.equals(text.toString())) {
mCopiesEditText.setText(MIN_COPIES_STRING);
}
mCopiesEditText.setEnabled(false);
mCopiesEditText.setFocusable(false);
}
if (mCopiesEditText.getError() == null
&& TextUtils.isEmpty(mCopiesEditText.getText())) {
mCopiesEditText.setText(String.valueOf(MIN_COPIES));
mCopiesEditText.setText(MIN_COPIES_STRING);
mCopiesEditText.requestFocus();
}
}