diff options
author | Philip P. Moltmann <moltmann@google.com> | 2017-06-13 15:29:01 -0700 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2017-06-13 15:29:01 -0700 |
commit | bdace63d5bda8a3f19300b52064a0f77bc5d3754 (patch) | |
tree | 5092704c99ca8c04ea7d6c9a7a0a4efcc4b913ed /packages/PrintSpooler/src | |
parent | 4eb76b2db843bb8ca82e17c078f7f4aed225cbaf (diff) |
Select the right pages to scrap
The code before overwrote some data the outside code expected to not be
modified which resulted in the scrapped pages to be offset.
Test: - cts-tradefed run cts-dev -m Print
- Tried to repro case in the bug
Bug: 62296301
Change-Id: If3f250dbca43125bbbe9faadc5183a6dbaa69481
Diffstat (limited to 'packages/PrintSpooler/src')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java b/packages/PrintSpooler/src/com/android/printspooler/util/PageRangeUtils.java index a36f5837ecb1..17d820a983f9 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 @@ public final class PageRangeUtils { // 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)) { |