When the search view is attached and detached we announce that
for accessibility. The trouble is that if the activity is being
torn down we are trying to access resources from a fragment that
is detached and the qcrash occurs. This change does not try to
access resources if the activity is finishing and also we do not
load resource strings if accessibility is not enabled.
bug:11127814
Change-Id: I4a47a8ed3b6a13544cf17b4395560246a33f0e2d
1. If a printer is not available it has to disabled and grayed out.
2. Cancle a print job if the app does not provide the requested pages.
3. Fix current printer selection flicker when the print dialog is
showing up. Often the current printer is initially set to the user's
favorite and then it is changed back to the PDF one.
bug:10983508
Change-Id: I8d53eb992cf1c92675ec09f61b2ec272b962fa68
The print dialog was full-screen which was not really needed and was
causing the dialog to jump instead of animate up/down when the IME
shows/hides.
bug:11116648
Change-Id: Ifb46fd80a90948270a1fa9c875258b8d0cdfc111
1. Updated the empty state of the all printers activity to show no printers message
if the user is searching and there are no matches and a searching for printers
message if the user is not filtering the printers list.
2. Adding the fake PDF printer after the historical printers are loaded to avoid the case
where we select the PDF printer and immediately after that the most used printer is
selected resulting in an undesirable UI flicker.
3. Fixed a bug where if the most used printer which is initially considered unavailable
is reported by the print service as available but the UI is not properly updated
leaving the user in no way to click on the print button.
bug: 10983508
Change-Id: I60fdb7761332850fd5b9ffc0cb572a6213024dba
The empty state is now showing searching for printers hint if
the user is not searching, otherwise the empty state's hint is
a searching for printers message.
bug:10983508
Change-Id: I3df79c167546998c8055d9ff85efa8b460a15e48
The dialog button is now the last item in the adapter if the
search for print service settings is not empty and resolves
to an intent.
bug:10983508
Change-Id: I348e1ede1097d6f3b78c72e871bf3097b99004b6
1. The refresh button in a print notification was using
wrong asset.
2. If the page count is unknown, just not show the page
count instead unknown.
bug:10983508
Change-Id: I15f1fcbff60fe1f30d37868864da41550bb14487
1. Initially we have a single printer, the fake PDF printer, and
wait for printers to be discovered. This printer was handling
only a couple of media sizes. Hence, if the app provides a
media size hint and the PDF printer does not support it, we
were essentially ignoring the suggested media size since it
was not supported by the selected printer and we fell back to
the default paper size for that printer. The fake PDF printer
should support all predefined media sizes.
2. The list of available paper sizes was shown in the order they
are added ignoring the current locale. It is much better user
experience if the media sizes used in the current locale are
shown at the top and all others after that. Also the media
sizes for the current locale should be alphabetically ordered
so the user can quickly find the desired one.
3. The orientation was reset on media size or printer change.
bug:10564537
Change-Id: Iaa0d42242730ce69cea3effd4d0f4bc087068804
The print job file name was not properly parsed. This resulted
in incorrect mapping from file to print job, thus deleting the
file when we do not have to.
bug:11069354
Change-Id: I7b8a7a7f98dd77b34119f2a9cd16a6ec3c22b63b
1. Limit the width of the dropdown of the printers list.
2. Add icons the the list in the all pritners activity.
3. Update the empty state view for the all printers activity.
bug:10983508
Change-Id: I19effcf32770fdda278009a060b5170a3f29988e
The dump code in PrintSpoolerService was relying on being
called only as a result of "adb shell dumpsys print" which
is apparently wrong. As a result the code was making wrong
assumption about the input arguments.
bug:11046234
Change-Id: Ie38f3cc5f17cac98b808fef6d6bbeaca22a62ef0
1. Sometimes selecting a printer from the full printer list does not
work if the selected printer was not in the initial drop down list
of the print dialog.
The reason was that there is a race. We use loaders in the print
dialog activity and the all printers one. When these loaders are
stopped we stop printer discovery since we do not want to keep this
potentially expensive process on going if the activity is paused
because say the user decide to press home and start playing his
favorite game while the printers dialog is up. As a result the
loader does not get printer updates until it is started.
The loader of the print dialog activity is stopped while the user is
selecting a printer from the all printers activity whose loader is
getting discovered recent printers. Now when the user selects a printer
the loader of the print dialog activity is started but may not get
the latest printers by the time onActivityResult is called with the
selected printer. Now we cache the selected printer id and if the
loader reports it we select that printer.
2. In the print dialog we show only a few of the discovered printers.
If the user selects a printer from the all printers activity that
is not in the initial list we shuffle the adapter data to make sure
the selected printer is in the shown subset. Now if the printers
change, i.e. the printers loader reports new result we were not
respecting the reshuffling made before so the short list of
printers changes yet again.
bug:11034216
Change-Id: I54fe3619e3328b65839d9f4b02309699eae7f8eb
The user can select all printers from the print dropdown to get to
a search for printers activity where one can filter out the list
of a available printers. We did not have an empty state UI for the
case when the query yields no printers.
bug:11009053
Change-Id: I6b45517b8a7b319992019a1bf65858319a19a0de