Always call back when printer changes

Otherwise it can happen that we swallow previous printer updates and
never end up getting a valid on-printers-updated call.

Fixes: 156222510
Test: atest PrinterDiscoverySessionLifecycleTest
Change-Id: Idab7399a6ab41ba9051cfcbbeebf4c45d6bfc053
This commit is contained in:
Philip P. Moltmann
2020-05-17 14:40:45 -07:00
parent 42de294ab3
commit 5020f797e6

View File

@@ -231,11 +231,6 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>>
// Add the new printers, i.e. what is left.
printers.addAll(discoveredPrinters.values());
// Do nothing if the printer list is not changed.
if (Objects.equals(mPrinters, printers)) {
return;
}
// Update the list of printers.
mPrinters.clear();
mPrinters.addAll(printers);