summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dave Langemak <dlangemak@google.com> 2013-11-19 08:34:57 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2013-11-19 08:34:57 -0800
commitd220d8202e67a82075ee20351657509ca0885b67 (patch)
treea536436512453e90c2daede359da4bd1e6215dda
parentbe462affdbe9f962c495d6eeabdad645aa9baf03 (diff)
parentc04aa87e4ac41b6c65dceb7b20d7a7f92c2efec1 (diff)
am c04aa87e: Merge "Fix incorrent page range parsing when custom print options used." into klp-dev
* commit 'c04aa87e4ac41b6c65dceb7b20d7a7f92c2efec1': Fix incorrent page range parsing when custom print options used.
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
index 88403a390629..c1c7a4e31dd1 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
@@ -1529,9 +1529,13 @@ public class PrintJobConfigActivity extends Activity {
builder.append(',');
}
PageRange pageRange = pageRanges[i];
- builder.append(pageRange.getStart());
- builder.append('-');
- builder.append(pageRange.getEnd());
+ final int shownStartPage = pageRange.getStart() + 1;
+ final int shownEndPage = pageRange.getEnd() + 1;
+ builder.append(shownStartPage);
+ if (shownStartPage != shownEndPage) {
+ builder.append('-');
+ builder.append(shownEndPage);
+ }
}
mPageRangeEditText.setText(builder.toString());
}