Merge "Select the right pages to scrap" into oc-dev
diff --git a/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java b/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java
index a36f583..17d820a 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java
@@ -426,7 +426,7 @@
// be based off the start of the written ones instead of zero.
// The written pages are always non-null and not empty.
final int offset = -pagesWrittenToFile[0].getStart();
- PageRangeUtils.offset(pagesInDocRequested, offset);
+ PageRangeUtils.offset(pagesInDocRequested.clone(), offset);
return pagesInDocRequested;
} else if (Arrays.equals(pagesInDocRequested, ALL_PAGES_RANGE)
&& isAllPages(pagesWrittenToFile, pageCount)) {