Merge "ShellRoot: Hold lock during binder death." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-26 23:42:46 +00:00
committed by Android (Google) Code Review

View File

@@ -1106,12 +1106,14 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
} }
void removeShellRoot(int windowType) { void removeShellRoot(int windowType) {
ShellRoot root = mShellRoots.get(windowType); synchronized(mWmService.mGlobalLock) {
if (root == null) { ShellRoot root = mShellRoots.get(windowType);
return; if (root == null) {
return;
}
root.clear();
mShellRoots.remove(windowType);
} }
root.clear();
mShellRoots.remove(windowType);
} }
void setRemoteInsetsController(IDisplayWindowInsetsController controller) { void setRemoteInsetsController(IDisplayWindowInsetsController controller) {