From 45e50e99cdb10b43b062612c2e87e75841f2c424 Mon Sep 17 00:00:00 2001 From: Svet Ganov Date: Thu, 23 Oct 2014 12:39:08 -0700 Subject: 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 --- .../PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/PrintSpooler/src') diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index dc76218..d781cb0 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -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(); } } -- cgit v1.1