OSDN Git Service

Update all printers activity's empty state and avoid selected printer flicker.
authorSvetoslav Ganov <svetoslavganov@google.com>
Sun, 6 Oct 2013 01:52:06 +0000 (18:52 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Sun, 6 Oct 2013 02:18:08 +0000 (19:18 -0700)
commit24c686b8b56950d5a1881cc660e53816d47e5e03
tree2ae9061cfe0c07c5a5705c5faeff095a5191778c
parent264c566a7f7d829de48131ac6d811b3db6f520bc
Update all printers activity's empty state and avoid selected printer flicker.

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
packages/PrintSpooler/res/values/styles.xml
packages/PrintSpooler/src/com/android/printspooler/FusedPrintersProvider.java
packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
packages/PrintSpooler/src/com/android/printspooler/SelectPrinterFragment.java