Merge "libbinder: Add log when FDs aren't supported in RpcSession" into main
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 77b3275..f30b2aa 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1585,10 +1585,15 @@
fdVariant = borrowed_fd(fd);
}
if (!mAllowFds) {
+ ALOGE("FDs are not allowed in this parcel. Both the service and the client must set "
+ "the FileDescriptorTransportMode and agree on the support.");
return FDS_NOT_ALLOWED;
}
switch (rpcFields->mSession->getFileDescriptorTransportMode()) {
case RpcSession::FileDescriptorTransportMode::NONE: {
+ ALOGE("FDs are not allowed in this RpcSession. Both the service and the client "
+ "must set "
+ "the FileDescriptorTransportMode and agree on the support.");
return FDS_NOT_ALLOWED;
}
case RpcSession::FileDescriptorTransportMode::UNIX: