Do not block transaction application on flush

Condition wait in applyTransactionState blocks threads sending a
synchronous transaction until SF can commit the transaction.  However,
the main SF thread can also applyTransactionState on pending
transactions.  In these cases, SF should not be blocked waiting for
itself to commit the transaction.

Bug: 127852667
Test: build, boot, manual
Change-Id: Id6b81529b2f1537ba5ce7aec27789e26225b167b
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 776d39b..d159a1f 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -576,7 +576,7 @@
                                const Vector<DisplayState>& displays, uint32_t flags,
                                const InputWindowCommands& inputWindowCommands,
                                const int64_t desiredPresentTime, const int64_t postTime,
-                               bool privileged) REQUIRES(mStateLock);
+                               bool privileged, bool isMainThread = false) REQUIRES(mStateLock);
     bool flushTransactionQueues();
     uint32_t getTransactionFlags(uint32_t flags);
     uint32_t peekTransactionFlags();