mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Wait until old ComposerClient is fully destroyed before recreating" into qt-dev
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user