Parcel transaction id between processes
Transaction ids were no being parceled which meant we were getting different ids for the same transaction passed across process boundaries
This was problematic for FaaS which dumped the transaction id in one process but the transaction was applied in another process with a different id meaning they couldn't be associated.
Bug: 230462538
Test: make sure transaction id is still the same after calling shell.Transitions#onTransitionReady (WM Shell process) from wm.Transition#onTransactionReady (WM process).
Change-Id: I66191310b87e784df62259de61b98ea0f9e33345
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 9bc159d..7191de8 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -660,6 +660,7 @@
status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel) {
+ const uint64_t transactionId = parcel->readUint64();
const uint32_t forceSynchronous = parcel->readUint32();
const uint32_t transactionNestCount = parcel->readUint32();
const bool animation = parcel->readBool();
@@ -737,6 +738,7 @@
inputWindowCommands.read(*parcel);
// Parsing was successful. Update the object.
+ mId = transactionId;
mForceSynchronous = forceSynchronous;
mTransactionNestCount = transactionNestCount;
mAnimation = animation;
@@ -768,6 +770,7 @@
const_cast<SurfaceComposerClient::Transaction*>(this)->cacheBuffers();
+ parcel->writeUint64(mId);
parcel->writeUint32(mForceSynchronous);
parcel->writeUint32(mTransactionNestCount);
parcel->writeBool(mAnimation);