OSDN Git Service

Update printers even if there are no printers found.
authorPhilip P. Moltmann <moltmann@google.com>
Tue, 8 Mar 2016 21:10:18 +0000 (13:10 -0800)
committerPhilip P. Moltmann <moltmann@google.com>
Mon, 14 Mar 2016 17:16:08 +0000 (10:16 -0700)
commitada5a047baefa5f4a857ac67aabe7c3a870dc3c7
tree78e94f80017b33684213313011e289e443eaf38f
parent2c4c90d2461101cc3de4db08d705bfd0cc282ecf
Update printers even if there are no printers found.

It can happen that before we stopped we reported a set of printers. Then
while the loader is stopped, we lost all printers. Then on re-start we
need to tell the clients that there are no printers anymore.

There is one issue: The fused-printers-provider might be started
before the printer registry is fully created. In this case we get a callback
and get all king of NPEs. Hence enqueue the first load behind the
current thread. This makes sure that the current operation - creation of
the printer registry - is finished.

Bug: 27643300
Change-Id: Ife6993d57457f23a0a4a54a11869c742c05da850
packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java