If services are enabled, services might become enabled in the future

Hence we always, always want to start a session if this is requested.

Bug: 27643066
Change-Id: I0fbf3ea8554de83d5ec6dc61b6b36f3783aab427
This commit is contained in:
Philip P. Moltmann
2016-03-08 13:26:38 -08:00
parent 2c4c90d246
commit f0847871ea

View File

@@ -443,10 +443,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks {
@Nullable List<PrinterId> printerIds) {
synchronized (mLock) {
throwIfDestroyedLocked();
// No services - nothing to do.
if (mActiveServices.isEmpty()) {
return;
}
// No session - nothing to do.
if (mPrinterDiscoverySession == null) {
return;
@@ -460,10 +457,7 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks {
public void stopPrinterDiscovery(@NonNull IPrinterDiscoveryObserver observer) {
synchronized (mLock) {
throwIfDestroyedLocked();
// No services - nothing to do.
if (mActiveServices.isEmpty()) {
return;
}
// No session - nothing to do.
if (mPrinterDiscoverySession == null) {
return;