blast: transaction ordering
This patch fixes two issues.
1) When a pending transactions is not found, don't try to use the iterator.
This fixes a crash that happens when we are in a bad state.
2) When a transaction doesn't have any callbacks, don't try to send
callbacks.
Bug: 130643588
Test: SurfaceFlinger_test
Change-Id: I6154c31dbf0b958683324c6b45e1a607691b84e8
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 6063555..48e1a64 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3617,7 +3617,7 @@
}
// If the state doesn't require a traversal and there are callbacks, send them now
- if (!(clientStateFlags & eTraversalNeeded)) {
+ if (!(clientStateFlags & eTraversalNeeded) && !listenerCallbacks.empty()) {
mTransactionCompletedThread.sendCallbacks();
}
transactionFlags |= clientStateFlags;