Create PrintDiscoverySession for future print services

If we currently don't have any print services we still want to register
a print observer so that when in the future a new service comes along we
can connect this service to the observer.

Bug: 25666802
Change-Id: I0cc28e92e0000fc9b5372733390095f3a8b19bc9
This commit is contained in:
Philip P. Moltmann
2015-11-20 13:38:10 -08:00
parent e2b95e4c56
commit e3ce0a4051

View File

@@ -343,9 +343,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks {
public void createPrinterDiscoverySession(IPrinterDiscoveryObserver observer) {
synchronized (mLock) {
throwIfDestroyedLocked();
if (mActiveServices.isEmpty()) {
return;
}
if (mPrinterDiscoverySession == null) {
// If we do not have a session, tell all service to create one.
mPrinterDiscoverySession = new PrinterDiscoverySessionMediator(mContext) {