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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user