summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler/src
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2014-10-23 12:39:08 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2014-10-23 19:43:54 +0000
commit45e50e99cdb10b43b062612c2e87e75841f2c424 (patch)
treedde571d5131ca46e4ae4ea217ae8eec1605e2ca0 /packages/PrintSpooler/src
parentbec0c53a402224cf4807efd4077047c870f5b58f (diff)
downloadframeworks_base-45e50e99cdb10b43b062612c2e87e75841f2c424.zip
frameworks_base-45e50e99cdb10b43b062612c2e87e75841f2c424.tar.gz
frameworks_base-45e50e99cdb10b43b062612c2e87e75841f2c424.tar.bz2
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
Diffstat (limited to 'packages/PrintSpooler/src')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java6
1 files changed, 5 insertions, 1 deletions
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();
}
}