Merge "Wait until old ComposerClient is fully destroyed before recreating" into qt-dev am: d93c9f0c2d
am: 5cb7cc40a7
am: 9c2e7c1cd2
Change-Id: I6251930043fbe98efb4c34735826d00719389655
This commit is contained in:
commit
f87dcceb86
1 changed files with 3 additions and 5 deletions
|
@ -108,12 +108,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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue