summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
index 3b5513ab12cf..793544082af9 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
@@ -267,9 +267,12 @@ public final class FusedPrintersProvider extends Loader<List<PrinterInfo>>
// The contract is that if we already have a valid,
// result the we have to deliver it immediately.
- if (!mPrinters.isEmpty()) {
- deliverResult(new ArrayList<>(mPrinters));
- }
+ (new Handler(Looper.getMainLooper())).post(new Runnable() {
+ @Override public void run() {
+ deliverResult(new ArrayList<>(mPrinters));
+ }
+ });
+
// Always load the data to ensure discovery period is
// started and to make sure obsolete printers are updated.
onForceLoad();