The operations of the remote renderer have to be performed in order, open,
render some pages, close. One of the tasks was executed on the wrong executor
resuling in a race and an occassional bad state.
Also fixed a NPE if the preview list is flinged and then the user presses
back.
bug:17537922
Change-Id: I5048078ba2b875a2a8335f3a4324afaa34d014a2
We were not clearing the tracked printer when the print activity is
paused and then not setting the tracked printer when the activity
is resumed.
bug:17525271
Change-Id: Ib0fb29006bfcf5ad03dce24b3407cd96dc421442
It is possible that we try to switch framents after the print
activity finish method is called. In this state the activity
is going away and trying to perform a fragment operation throws.
Now if we are finishing no fragment opration is performed.
bug:17520007
Change-Id: I0dd935d3cdaeddca31fccf49bd5de97e878abb9d
The bound pages in the adapter were not properly tracked, more
specifically we did not remove pages from the bound set ending
up in a bad state. Also when the printer changes and if the
new one has different page size the content disappears due to
us not notifying for the data set change.
bug:17515670
Change-Id: Iac74e864609012f6804584fa133e87c27dc186a5
The code executed in the shredder completion callback must
be called on the main thread but instead it was called on
another one. This led to a crash.
bug:17514533
Change-Id: Id9e86d38a90fedadc60f967b193470fd83eb3362
We laizily request printer capabilities and when they are reported
we were not updating the preview and as a result the content was not
rendered, hence pages showing an empty state.
bug:17514117
Change-Id: Icfee7eaa1ab63f5e4d7655d4057ef2110c27cd43
If the printer capabilities are reported with a delay which is pretty
common we were trying to evaluate the preview page dimensions without
having a media size resulting in a NPE.
bug:17501953
Change-Id: I6765137f61b8fd060e9eabff07e632875d934963
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