Revert "libbinder: vendor binder has a different header"
This reverts commit d70160f2989f18d4209ea464eb1635d4cc7ff827.
Reason for revert:
Broken test: android.os.ParcelTest#testCallingWorkSourceUidAfterEnforce on git_qt-dev-plus-aosp on aosp_cf_x86_phone-userdebug at 5768150
Bug: 138691255
Change-Id: I0304d70627ee3cc16738313b09a258108b210a5b
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 5537430..20d2295 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -494,12 +494,6 @@
}
}
-#ifdef __ANDROID_VNDK__
-constexpr int32_t kHeader = B_PACK_CHARS('V', 'N', 'D', 'R');
-#else
-constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T');
-#endif
-
// Write RPC headers. (previously just the interface token)
status_t Parcel::writeInterfaceToken(const String16& interface)
{
@@ -508,7 +502,6 @@
updateWorkSourceRequestHeaderPosition();
writeInt32(threadState->shouldPropagateWorkSource() ?
threadState->getCallingWorkSourceUid() : IPCThreadState::kUnsetWorkSource);
- writeInt32(kHeader);
// currently the interface identification token is just its name as a string
return writeString16(interface);
}
@@ -566,12 +559,6 @@
updateWorkSourceRequestHeaderPosition();
int32_t workSource = readInt32();
threadState->setCallingWorkSourceUidWithoutPropagation(workSource);
- // vendor header
- int32_t header = readInt32();
- if (header != kHeader) {
- ALOGE("Expecting header 0x%x but found 0x%x. Mixing copies of libbinder?", kHeader, header);
- return false;
- }
// Interface descriptor.
const String16 str(readString16());
if (str == interface) {