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

Commit 1c2ad2b5 authored by Valerie Hau's avatar Valerie Hau Committed by android-build-merger
Browse files

Merge "Wait until old ComposerClient is fully destroyed before recreating"...

Merge "Wait until old ComposerClient is fully destroyed before recreating" into qt-dev am: d93c9f0c
am: 27bca340

Change-Id: I1e8f38a8a15956c85b000d89645ff80cfdf125b8
parents 2199bc65 27bca340
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -109,12 +109,10 @@ class ComposerImpl : public Interface {
            // inverted (create and then destroy). Wait for a brief period to
            // see if the existing client is destroyed.
            ALOGD("waiting for previous client to be destroyed");
            mClientDestroyedCondition.wait_for(
                lock, 1s, [this]() -> bool { return mClient.promote() == nullptr; });
            if (mClient.promote() != nullptr) {
            mClientDestroyedCondition.wait_for(lock, 1s,
                                               [this]() -> bool { return mClient == nullptr; });
            if (mClient != nullptr) {
                ALOGD("previous client was not destroyed");
            } else {
                mClient.clear();
            }
        }