Merge "Multiple printer discovery session instances and other bugs." into klp-dev

This commit is contained in:
Svetoslav
2013-09-24 20:37:58 +00:00
committed by Android (Google) Code Review
5 changed files with 68 additions and 18 deletions

View File

@ -86,10 +86,6 @@ public class FusedPrintersProvider extends Loader<List<PrinterInfo>> {
}
private void computeAndDeliverResult(Map<PrinterId, PrinterInfo> discoveredPrinters) {
if (!isStarted()) {
return;
}
List<PrinterInfo> printers = new ArrayList<PrinterInfo>();
// Add the updated favorite printers.
@ -123,8 +119,10 @@ public class FusedPrintersProvider extends Loader<List<PrinterInfo>> {
mPrinters.clear();
mPrinters.addAll(printers);
// Deliver the printers.
deliverResult(printers);
if (isStarted()) {
// Deliver the printers.
deliverResult(printers);
}
}
@Override

View File

@ -74,7 +74,7 @@ public final class PrintSpoolerService extends Service {
private static final String LOG_TAG = "PrintSpoolerService";
private static final boolean DEBUG_PRINT_JOB_LIFECYCLE = true;
private static final boolean DEBUG_PRINT_JOB_LIFECYCLE = false;
private static final boolean DEBUG_PERSISTENCE = false;