A recent bug fix exposed another one where we were not updating
the internal state of the remote print document after it finishes
updating. This resulted in a crash on every print.
bug:16966145
Change-Id: I398ff7976533241e3d4cb6cd27f69cdc25e67be9
The logic when a page view to request the content had a logical
error and it was getting in a bad state where it never requested
the content anymore. This change simplifies the logic and minimizes
the kept state.
Removed unnecessary calls to recycle for a bitmap as according
to the graphics folks we should not be calling this API anymore.
bug:16966145
Change-Id: Idda8314b43343136d3b867167261790481116fac
The print preview UI owns and drives the lifecycle of several objects.
These objects were torn down too late resulting in an attempt to use
the activity as a context when it was no longer valid and service unbind
resulting in causing a crash.
Fixed a bug where if the back button is pressed mutiple times when
the print UI is being initialized a crash occurs.
bug:17454041
Change-Id: Ic1455b467586f0ad65f907e2160ec5cfb2d17d05
If the user input in the print UI is invalid we show an error icon
next to it. The design requires no error message being shown in a
popup but TextView does show the popup all the time.
bug:16966145
Change-Id: I7aa1ec8093bc76e2f440bcb243609e92e049786b
1. Leftover code was setting the state to configuring
before initialization is complete.
2. We were not cancelling the print job if cancelled
when initializing.
3. The remote print document was cancelled even if
doing nothing.
bug:17451600
Change-Id: I79a80b723af8537da260012470748b4e8831fd9e
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994
Change-Id: I7deba535af99457bea3c118202314f0f3812e809
1. Added an empty state for pages that are being rendered.
2. Fixed a NPA on a binder thread when destoroying the
remote print adapter.
3. Fixed a rare crash when the print activity gets an
activity class callback while initializing.
4. Changed the preview pages on phone in land to four.
5. Fixed a flicker from a list of pages to an empty state
and then back to the list of pages.
bug:15704969
bug:16966145
Change-Id: I0eea2f30a102d8fefcbf90187fa6d8612fb19434
Conflicts:
packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
Using compression and decompression for moving bitmap data
acorss processes is slow as compression is expensive. This
change switches to using direct streaming of the bitmap
data.
bug:15938254
Change-Id: I78bc450031ee60ada4c3b66f14586a73c72ce34f
1. Fixed a crash when orientation changes and the content
is scrolled due to wrong size bitmap being requested.
2. Closed a file dscriptior that was being left open.
3. Clearing the bitmap before passing it to the renderer to
ensure it is white for pixels not touched when rendering.
4. Removed debug logs.
5. Switched to the correct layout manager for RecyclerView.
bug:16966145
Change-Id: I8ab9d22635c93cac5ff85c6f4b5d82e58cd8df5c
Security review of the PDF rendering code revealed that it is
not sercure. Therefore, this code must be run in a sandbox.
This change moves the rendering code in an isolated process.
bug:16897933
Change-Id: I711ce42a56892db1837950137bfaa79e1d61a7c4
1. Fixed an issue where input focus is given to the copies
edit text every other time we expand the options UI. We
want focus there only if the user touches the control.
bug:16966145
2. Fixed the all printers list view to have item dividers
reaching the left and right ends of the list view.
bug:17288761
3. Fixed an issue where the user can deselect all pages
which is not only an invalid state but also causes a crash.
bug:17286198
4. Tweaked the minimal size of the preview in landscape on
phone to better accomodate the page.
bug:17288904
5. Fixed a regression introduced by a change from the UI folks.
Change-Id: Ida7dad7eea413295a840028060810b2619c616e8
If the user cancels printing we cancel the current
pring operation in the RemotePrintDocument which is
a state machine enforcing valid state transitions.
A valid transition was not allowed: finishing after
canceled.
bug:17182301
Change-Id: Iccf3a78d7dc736a64bf5c44941a8f8064dcd0ec3
The "More options" button needed changes to match the
new UX spec. Also fixed some identation issues as well
as a missing marging in the erorr UI.
bug:16301066
Change-Id: I29f0d41915d1816d754f2c6288a7387aafeba2c2
Removed a duplicate resource also defined in the platform
resources. Added a tint to the print spooler icon.
bug:16568027
Change-Id: I1c0b9a7bd75bc59d1d86653c05d8fc2bb77056c1
1. The last row of print options was not visible on a phone.
2. The preview page size on a phone in landscape unusably small.
3. Updated the Save to PDF icon.
bug:16966145
Change-Id: I25ce1572758c62f34344683af2452fb045bb857e
When printing to a PDF file we get a Uri from the storage APIs
and write the content. Once the file is written to storage the
print job is completed and there is print service involved. Th
spooler was wrongly putting the job in a failed state instead
of a complete state.
bug:16522267
Change-Id: I4741c9b9eb763e118e7dfb2c7c502bd7fc13f7a1
PDF is the only format suppored for printing but a buggy app
can write content in another format which was crashing the
print spooler. Now we are generating an error instead of
crashing.
bug:16487161
Change-Id: Ic59d2ac6d57213f4e8f364659d8dc7df2140e61d