diff options
Diffstat (limited to 'libs/binder/Parcel.cpp')
| -rw-r--r-- | libs/binder/Parcel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 146ddef8ba..028e03dc2e 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -886,6 +886,9 @@ void Parcel::updateWorkSourceRequestHeaderPosition() const { } #ifdef BINDER_WITH_KERNEL_IPC + +#if defined(__ANDROID__) + #if defined(__ANDROID_VNDK__) constexpr int32_t kHeader = B_PACK_CHARS('V', 'N', 'D', 'R'); #elif defined(__ANDROID_RECOVERY__) @@ -893,6 +896,14 @@ constexpr int32_t kHeader = B_PACK_CHARS('R', 'E', 'C', 'O'); #else constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T'); #endif + +#else // ANDROID not defined + +// If kernel binder is used in new environments, we need to make sure it's separated +// out and has a separate header. +constexpr int32_t kHeader = B_PACK_CHARS('U', 'N', 'K', 'N'); +#endif + #endif // BINDER_WITH_KERNEL_IPC // Write RPC headers. (previously just the interface token) |