summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Kevin Lindkvist <lindkvist@google.com> 2022-11-23 13:23:42 +0100
committer Kevin Lindkvist <lindkvist@google.com> 2025-01-28 08:44:35 -0800
commite8e12433e1f7628904311347f9aeb455c2cb0a4f (patch)
tree837559914fccc608780266d517c8045d8c482e74 /libs/binder/Parcel.cpp
parenta5f7d9f7b8db227c0d72664394513ed58fe38b59 (diff)
Enable compilation of libbinder on Fuchsia
This ensures that getMinSchedulerPolicy and getMinSchedulerPriority are only called on Linux as they are only defined here. This replaces some __ANDROID__ ifdef's with BINDER_WITH_KERNEL_IPC. Change-Id: Idec83bf1715ac3c62ac7a849aa188aa491a19fda
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 65c6553e44..1e83c350b1 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -299,8 +299,13 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) {
obj.handle = handle;
obj.cookie = 0;
} else {
+#if __linux__
int policy = local->getMinSchedulerPolicy();
int priority = local->getMinSchedulerPriority();
+#else
+ int policy = 0;
+ int priority = 0;
+#endif
if (policy != 0 || priority != 0) {
// override value, since it is set explicitly