Acquire proc lock prior to the call into AM service connection holder
Since that holder could grab the WM lock and call back into AMS. Bug: 182885705 Test: atest CtsAppTestCases:ServiceTest Change-Id: I41c477595caf4a43d8efad91343fe57bbb981a70
This commit is contained in:
@@ -15647,9 +15647,11 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
final ActivityServiceConnectionsHolder holder =
|
||||
(ActivityServiceConnectionsHolder) connectionHolder;
|
||||
synchronized (ActivityManagerService.this) {
|
||||
holder.forEachConnection(cr -> mServices.removeConnectionLocked(
|
||||
(ConnectionRecord) cr, null /* skipApp */, holder /* skipAct */,
|
||||
false /* enqueueOomAdj */));
|
||||
synchronized (mProcLock) {
|
||||
holder.forEachConnection(cr -> mServices.removeConnectionLocked(
|
||||
(ConnectionRecord) cr, null /* skipApp */, holder /* skipAct */,
|
||||
false /* enqueueOomAdj */));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user