Fix deadlock between AppOpsService and HistoricalRegistry.

HistoricalRegistry locks its mOnDiskLock first, and then its
mInMemoryLock (which is the AppOpsService object), so AppOpsService
cannot call into HistoricalRegistry while holding its own lock.

Fixes: 168020658
Test: presubmit
Change-Id: I0d2a38b6b416c59f10d15b60badf234a80f16152
This commit is contained in:
Hai Zhang
2020-09-21 17:32:10 +00:00
parent 7fb5deb779
commit 8f527b3e99

View File

@@ -1786,9 +1786,9 @@ public class AppOpsService extends IAppOpsService.Stub {
}
}
}
mHistoricalRegistry.clearHistory(uid, packageName);
}
mHistoricalRegistry.clearHistory(uid, packageName);
}
public void uidRemoved(int uid) {