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

Commit e379b5a2 authored by Patrick Williams's avatar Patrick Williams
Browse files

Check if WindowInfosListener is present during remove

This reverts commit 4854af5f.

Bug: 263311858
Test: presubmits
Change-Id: I1e53499745117fce80435fdf40e66efc55147bf9
parent 5d09a038
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ status_t WindowInfosListenerReporter::removeWindowInfosListener(
    status_t status = OK;
    {
        std::scoped_lock lock(mListenersMutex);
        if (mWindowInfosListeners.find(windowInfosListener) == mWindowInfosListeners.end()) {
            return status;
        }

        if (mWindowInfosListeners.size() == 1) {
            binder::Status s = surfaceComposer->removeWindowInfosListener(this);
            status = statusTFromBinderStatus(s);