From 6c0c9639f429d518d5af0d76ca77fbff165cf122 Mon Sep 17 00:00:00 2001 From: Fabián Cañas Date: Fri, 13 Jan 2023 15:21:16 -0500 Subject: 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 --- libs/binder/Binder.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libs/binder/Binder.cpp') diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp index da5affb274..5fa8bfa616 100644 --- a/libs/binder/Binder.cpp +++ b/libs/binder/Binder.cpp @@ -409,11 +409,9 @@ status_t BBinder::transact( 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; -- cgit v1.2.3-59-g8ed1b