Fix potential deadlock in shutdown in HistoricalRegistry am: 4a2d4ddf6e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13082067 Change-Id: Iedd8d3224a84f0ba0677709091982abcba54ec9e
This commit is contained in:
@@ -669,10 +669,12 @@ final class HistoricalRegistry {
|
||||
|
||||
void shutdown() {
|
||||
synchronized (mInMemoryLock) {
|
||||
if (mMode != AppOpsManager.HISTORICAL_MODE_DISABLED) {
|
||||
persistPendingHistory();
|
||||
if (mMode == AppOpsManager.HISTORICAL_MODE_DISABLED) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Do not call persistPendingHistory inside the memory lock, due to possible deadlock
|
||||
persistPendingHistory();
|
||||
}
|
||||
|
||||
void persistPendingHistory() {
|
||||
|
||||
Reference in New Issue
Block a user