Add interfaceDescriptor to RecordedTransaction
This change adds a binder's interfaceDescriptor to RecordedTransaction.
While most Parcels self-identify with an interface descriptor, that is
not required. By adding the name of the interface that generated the
transaction, a RecordedTransaction and its Parcels can be more easily
decoded.
Test: `atest binderUnitTest`
Change-Id: I052640bf26ee3fa67a74a388ee4de930a684e2f4
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index da5affb..5fa8bfa 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -409,11 +409,9 @@
Parcel emptyReply;
timespec ts;
timespec_get(&ts, TIME_UTC);
- auto transaction =
- android::binder::debug::RecordedTransaction::fromDetails(code, flags, ts, data,
- reply ? *reply
- : emptyReply,
- err);
+ auto transaction = android::binder::debug::RecordedTransaction::
+ fromDetails(getInterfaceDescriptor(), code, flags, ts, data,
+ reply ? *reply : emptyReply, err);
if (transaction) {
if (status_t err = transaction->dumpToFile(e->mRecordingFd); err != NO_ERROR) {
LOG(INFO) << "Failed to dump RecordedTransaction to file with error " << err;