History log of /frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f6cd14dbc99b38af7afe1e5f72347395603d7de2 20-Nov-2014 Svet Ganov <svetoslavganov@google.com> Print spooler crash when printing after a rotation.

1. Available printers are provided by a loader driven by the activity
lifecycle. After a rotation of an app that does not handle rotation
the print activity is destroyed in a delayed fashion. When another
print task is started the loader of the destroed activity gets two
cancellations, one when the activity is stopped and one when it is
destroyed but when the second cancellation happens the loader has a
bad state that it is loading while it is not and a NPE occurs.

2. If a rotation happens early before the print activity is fully initialized
(there are asyncrconous operations that take place) we get a NPE as
the print preview controller is not created yet.

3. A lockup of the print preview process occurs if the print print
activity is destroyed after we initiated binding to the rendering
service but before we receive the remote interface. In this case no
remote service is received as exepcted since we already unbound from
it resulting in a missed signal.

bug:18238590

Change-Id: I81817d81702f649ded97dfbab7d7bba28f22fa91
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
2916f658c9a55aa5b08a3bbe3056dbfd78e0e1b0 24-Oct-2014 Svet Ganov <svetoslavganov@google.com> Sometimes historical printers not properly ordered.

We order printers based on past usage. In some cases the ordering
does not work. The reason for that was an incorrect assumption that
the entries in an ArrayMap are ordered in the order they are added.

bug:18109283

Change-Id: Ie367e4ca5e6bd79f335a060074c9211054e3a931
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
25885ecbe4306165872c1b24628e9646778a0535 14-Jul-2014 Svet Ganov <svetoslavganov@google.com> Rename historical records if printer name changed.

We keep track of previously used printers. It is possible that the name
of a previously used printer changed. In this case we want to change
this printer's name in the historical records to be able to show the
correct name in the UI when loading the history.

bug:13524346

Change-Id: I0a37bd52a564df5a84c816abfcf03db83de93b97
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
48fec5c9a3e4d78bc4cd175fae05be153ac587af 14-Jul-2014 Svet Ganov <svetoslavganov@google.com> Top printer not properly selected.

We keep track of historically used printers and when the print dialog
is opened we load them. We were selecting the first printer before the
historical ones are loaded which led to a case where the PDF printer
is selected and then a better printer appears but we have the PDF one
selected.

Also we were asking the printer spinner for the current printer but
if the data set of the adapter changes and we ask the spinner for the
selection we get a wrong answer because the adapter and the view are
off sync since the view is updated on the next message.

Change-Id: I0c12d2d3b19227a8f6af6e421b92013ec06cc021
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
a798c0a984f29f7180883a61839f68d2cbf0c6ce 15-May-2014 Svetoslav <svetoslavganov@google.com> Refactor printing

Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java