Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dc57293 authored by Robert Carr's avatar Robert Carr
Browse files

ShellRoot: Hold lock during binder death.

We need to acquire the lock in removeShellRoot because we may
end up calling it from a binder thread.

Bug: 154486882
Test: Existing tests pass
Change-Id: I59bfd521a04f81590c403025c729729438d0d841
parent 7a639dce
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1102,6 +1102,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    }

    void removeShellRoot(int windowType) {
        synchronized(mWmService.mGlobalLock) {
            ShellRoot root = mShellRoots.get(windowType);
            if (root == null) {
                return;
@@ -1109,6 +1110,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            root.clear();
            mShellRoots.remove(windowType);
        }
    }

    void setRemoteInsetsController(IDisplayWindowInsetsController controller) {
        if (mRemoteInsetsControlTarget != null) {