Add ids to transactions and dump them in transaction trace
This is required for associating dumped transactions merges on the client side to dump transaction traces on the server side
Test: Make sure a transaction id is present in the dump
Change-Id: I8d3ad102bedb839901f0a818779c7d35519c669a
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 7a2f656..2f113ee 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -72,7 +72,8 @@
const Vector<ComposerState>& state, const Vector<DisplayState>& displays,
uint32_t flags, const sp<IBinder>& applyToken, const InputWindowCommands& commands,
int64_t desiredPresentTime, const client_cache_t& uncacheBuffer,
- bool hasListenerCallbacks, const std::vector<ListenerCallbacks>& listenerCallbacks) {
+ bool hasListenerCallbacks, const std::vector<ListenerCallbacks>& listenerCallbacks,
+ uint64_t transactionId) {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
@@ -100,6 +101,8 @@
SAFE_PARCEL(data.writeInt64Vector, callbackIds);
}
+ SAFE_PARCEL(data.writeUint64, transactionId);
+
return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply);
}
@@ -1278,9 +1281,13 @@
SAFE_PARCEL(data.readInt64Vector, &callbackIds);
listenerCallbacks.emplace_back(tmpBinder, callbackIds);
}
+
+ uint64_t transactionId = -1;
+ SAFE_PARCEL(data.readUint64, &transactionId);
+
return setTransactionState(state, displays, stateFlags, applyToken, inputWindowCommands,
desiredPresentTime, uncachedBuffer, hasListenerCallbacks,
- listenerCallbacks);
+ listenerCallbacks, transactionId);
}
case BOOT_FINISHED: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);