Fix an issue where we could wait for a non-existing transaction

This fixes the issue:
"Call not sent" dialog takes too long to dismiss after hitting OK"

Note: the system would recover after a 5 second timeout.

Bug: 5534520
Change-Id: Ifa37e594b50581f498479a5858672441b3d7dd87
This commit is contained in:
Mathias Agopian 2011-11-07 21:58:03 -08:00
parent a5f9676ecc
commit 386aa98c4f

View File

@ -1217,12 +1217,13 @@ void SurfaceFlinger::setTransactionState(const Vector<ComposerState>& state,
sp<Client> client( static_cast<Client *>(s.client.get()) );
transactionFlags |= setClientStateLocked(client, s.state);
}
if (transactionFlags) {
setTransactionFlags(transactionFlags);
}
// if this is a synchronous transaction, wait for it to take effect before
// returning.
if (transactionFlags) {
// this triggers the transaction
setTransactionFlags(transactionFlags);
// if this is a synchronous transaction, wait for it to take effect
// before returning.
if (flags & eSynchronous) {
mTransationPending = true;
}
@ -1237,6 +1238,7 @@ void SurfaceFlinger::setTransactionState(const Vector<ComposerState>& state,
}
}
}
}
int SurfaceFlinger::setOrientation(DisplayID dpy,
int orientation, uint32_t flags)