diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2013-09-21 12:01:54 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2013-09-25 18:32:25 -0700 |
commit | b0e68fdc9cb6ba292adc4590f406d921abea08d5 (patch) | |
tree | 9fb29a1441a46e14d5b009ff345acead8d33a563 /packages | |
parent | a53b854103c06f194a1883275d5cdfd78882a248 (diff) | |
download | frameworks_base-b0e68fdc9cb6ba292adc4590f406d921abea08d5.zip frameworks_base-b0e68fdc9cb6ba292adc4590f406d921abea08d5.tar.gz frameworks_base-b0e68fdc9cb6ba292adc4590f406d921abea08d5.tar.bz2 |
Disallow range selection if the document has unknown page count.
bug:10741878
Change-Id: Ibf2272125e81f14ede3fdfec86aee10b908ade01
Diffstat (limited to 'packages')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java index 05b0b69..b211c1b 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java @@ -1087,7 +1087,9 @@ public class PrintJobConfigActivity extends Activity { } } - //TODO: Catch the error if start is less grater than the end. + // We intentionally do not catch the case of the from page being + // greater than the to page. When computing the requested pages + // we just swap them if necessary. mPageRangeEditText.setError(null); mPrintButton.setEnabled(true); @@ -1817,8 +1819,7 @@ public class PrintJobConfigActivity extends Activity { // Range options PrintDocumentInfo info = mDocument.info; - if (info != null && (info.getPageCount() > 0 - || info.getPageCount() == PrintDocumentInfo.PAGE_COUNT_UNKNOWN)) { + if (info != null && info.getPageCount() > 0) { if (info.getPageCount() == 1) { mRangeOptionsSpinner.setEnabled(false); } else { |