remove the lock-use for prunePrintService in case blocking main thread

As in the change: I4f4cdaba65132dc2ef054877cbb097b499a723f6
the lock object is removed when calling RemotePrintSpooler
and so as it in the method prunePrintService(). But in the
constructor of UserState, the mLock is still held when calling
prunePrintService(), it may also block the main thread

It is better to take it out of the synchronized block

Test: null

Change-Id: I709b491d611dbcbf21a5fd493b879ed290dd0247
Signed-off-by: yangbingqian <yangbingqian@xiaomi.com>
This commit is contained in:
yangbingqian
2017-06-12 22:45:50 +08:00
parent a1df5b25e6
commit 82cff68a3a

View File

@@ -154,10 +154,12 @@ final class UserState implements PrintSpoolerCallbacks, PrintServiceCallbacks,
readInstalledPrintServicesLocked();
upgradePersistentStateIfNeeded();
readDisabledPrintServicesLocked();
}
// Some print services might have gotten installed before the User State came up
prunePrintServices();
// Some print services might have gotten installed before the User State came up
prunePrintServices();
synchronized (mLock) {
onConfigurationChangedLocked();
}
}