summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-05-20 14:56:05 -0700
committerNikoli Cartagena <dargeren@google.com>2019-06-10 15:55:06 -0700
commitb302e914164a2b3c729fe6e8bd8eb565789524e3 (patch)
tree6526099afa03b35199efc91008352159e94021ed
parentba20bcf9bfee19c3bbbbeaa306f63c3ea8f54f92 (diff)
downloadlibhidl-b302e914164a2b3c729fe6e8bd8eb565789524e3.tar.gz
libbinder Status has the exception type EX_HAS_REPLY_HEADER for fat Java-specific errors. This code jumps Parcel position to an arbitrary position in memory based on a value it reads from this parcel. Since this is unused in HIDL, removing entirely. Bug: 132650049 Test: HIDL's run_all_device_tests.sh Change-Id: Iac815f92c5da4ead283d3566892b5d4d209dab3b (cherry picked from commit 7fd5fbec0c4118203d37cfcc13d9451d3638c53d)
-rw-r--r--transport/HidlBinderSupport.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 31e3be8..1217de1 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -155,22 +155,6 @@ status_t readFromParcel(Status *s, const Parcel& parcel) {
return status;
}
- // Skip over fat response headers. Not used (or propagated) in native code.
- if (exception == Status::EX_HAS_REPLY_HEADER) {
- // Note that the header size includes the 4 byte size field.
- const int32_t header_start = parcel.dataPosition();
- int32_t header_size;
- status = parcel.readInt32(&header_size);
- if (status != OK) {
- s->setFromStatusT(status);
- return status;
- }
- parcel.setDataPosition(header_start + header_size);
- // And fat response headers are currently only used when there are no
- // exceptions, so act like there was no error.
- exception = Status::EX_NONE;
- }
-
if (exception == Status::EX_NONE) {
*s = Status::ok();
return status;