Only force send callbacks if they are registered
Some clients of ASurfaceControl may not set callbacks. We do not want to call finalizePendingCallbacks in this case. Bug: 159231312 Test: build, boot, SurfaceFlinger_test, libsurfaceflinger_unittest Change-Id: I62dc270302a60274d8d1192d0e35ce3f48721e6c
This commit is contained in:
parent
09397229e3
commit
109ad71569
1 changed files with 3 additions and 0 deletions
|
@ -154,6 +154,9 @@ status_t TransactionCompletedThread::registerPendingCallbackHandle(
|
|||
|
||||
status_t TransactionCompletedThread::finalizePendingCallbackHandles(
|
||||
const std::deque<sp<CallbackHandle>>& handles) {
|
||||
if (handles.empty()) {
|
||||
return NO_ERROR;
|
||||
}
|
||||
std::lock_guard lock(mMutex);
|
||||
if (!mRunning) {
|
||||
ALOGE("cannot add presented callback handle because the callback thread isn't running");
|
||||
|
|
Loading…
Reference in a new issue